]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/exynos: Handle failed IOMMU device registration properly
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 14 Jul 2022 16:55:46 +0000 (19:55 +0300)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:30:43 +0000 (10:30 +0200)
commitdd69d9e5125774939c831e45980284b2321d4e82
treeac9f3dfefadd28ab5e2d766046e70d38cf845e8e
parent0910c7ace78e01b6f1ec71fbaf7a6515cfd83773
iommu/exynos: Handle failed IOMMU device registration properly

If iommu_device_register() fails in exynos_sysmmu_probe(), the previous
calls have to be cleaned up. In this case, the iommu_device_sysfs_add()
should be cleaned up, by calling its remove counterpart call.

Fixes: 2e3f523a7355 ("iommu/exynos: Make use of iommu_device_register interface")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20220714165550.8884-3-semen.protsenko@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c