Commit 7d4e6ccd authored by Jon Derrick's avatar Jon Derrick Committed by Joerg Roedel
Browse files

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: default avatarJon Derrick <jonathan.derrick@intel.com>
Fixes: 797a8b4d ("iommu: Handle default domain attach failure")
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4a350a0e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -751,6 +751,7 @@ err_put_group:
	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: