iommu: Tidy the control flow in iommu_group_store_type()
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 11 May 2023 04:42:15 +0000 (01:42 -0300)
committerJoerg Roedel <jroedel@suse.de>
Tue, 23 May 2023 06:15:58 +0000 (08:15 +0200)
commit5957c19305b10c73090b1390653ddf7e5e21aa35
tree6d922fccf46059455b1acc0672548d1a24ccb9cd
parente996c12d76d0b1aa8d5f082c6074e82398061943
iommu: Tidy the control flow in iommu_group_store_type()

Use a normal "goto unwind" instead of trying to be clever with checking
!ret and manually managing the unlock.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/17-v5-1b99ae392328+44574-iommu_err_unwind_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c