Skip to content

Commit 7d4e6cc

Browse files
Jon Derrickjoergroedel
authored andcommitted
iommu: Remove device link to group on failure
This adds the missing teardown step that removes the device link from the group when the device addition fails. Signed-off-by: Jon Derrick <[email protected]> Fixes: 797a8b4 ("iommu: Handle default domain attach failure") Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 4a350a0 commit 7d4e6cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iommu/iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
751751
mutex_unlock(&group->mutex);
752752
dev->iommu_group = NULL;
753753
kobject_put(group->devices_kobj);
754+
sysfs_remove_link(group->devices_kobj, device->name);
754755
err_free_name:
755756
kfree(device->name);
756757
err_remove_link:

0 commit comments

Comments
 (0)