mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
iommu: Remove device link to group on failure
commit7d4e6ccd1fupstream. This adds the missing teardown step that removes the device link from the group when the device addition fails. Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Fixes:797a8b4d76("iommu: Handle default domain attach failure") Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
44ce3acf59
commit
d2cbb83ce8
|
|
@ -650,6 +650,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
|
|||
mutex_unlock(&group->mutex);
|
||||
dev->iommu_group = NULL;
|
||||
kobject_put(group->devices_kobj);
|
||||
sysfs_remove_link(group->devices_kobj, device->name);
|
||||
err_free_name:
|
||||
kfree(device->name);
|
||||
err_remove_link:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user