iommu/exynos: Handle failed IOMMU device registration properly
stable inclusion from stable-v5.10.137 commit 0ce20194b4a68fda406011c3e6c674d076b46a5e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0ce20194b4a68fda406011c3e6c674d076b46a5e -------------------------------- [ Upstream commit fce398d2 ] 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: d2c302b6 ("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> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment