iommu: Remove device link to group on failure
authorJon Derrick <jonathan.derrick@intel.com>
Tue, 31 Dec 2019 20:24:19 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:47:00 +0000 (19:47 +0100)
commitd2cbb83ce8eae44f1d22012244887c09a926f876
treee51da2e23e3171f9af43d626ac614e6c140252eb
parent44ce3acf595d4575fbae1f26dd0ad1e4e75d7bf0
iommu: Remove device link to group on failure

commit 7d4e6ccd1fb09dbfbc49746ca82bd5c25ad4bfe4 upstream.

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: 797a8b4d768c5 ("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>
drivers/iommu/iommu.c