提交 7d4e6ccd 编写于 作者: J Jon Derrick 提交者: Joerg Roedel

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: NJon Derrick <jonathan.derrick@intel.com>
Fixes: 797a8b4d ("iommu: Handle default domain attach failure")
Reviewed-by: NLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 4a350a0e
......@@ -751,6 +751,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册