]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm: Cleanup resources in case of probe error path
authorAmey Narkhede <ameynarkhede03@gmail.com>
Tue, 8 Jun 2021 16:45:59 +0000 (22:15 +0530)
committerWill Deacon <will@kernel.org>
Tue, 8 Jun 2021 16:53:13 +0000 (17:53 +0100)
commita96e636f9f26f3fea981df83d927b8bcf632ee9c
treec3231d0ab16b168c08951ab6b289987b9256133f
parentc3c22a7414968b0f96225ea3d4abcd52f3e5d276
iommu/arm: Cleanup resources in case of probe error path

If device registration fails, remove sysfs attribute
and if setting bus callbacks fails, unregister the device
and cleanup the sysfs attribute.

Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>
Link: https://lore.kernel.org/r/20210608164559.204023-1-ameynarkhede03@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu/arm-smmu.c
drivers/iommu/arm/arm-smmu/qcom_iommu.c