[PATCH] iommu: arm-smmu: Handle return of iommu_device_register.
Arvind Yadav
arvind.yadav.cs at gmail.com
Thu Jun 22 00:27:42 PDT 2017
iommu_device_register can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs at gmail.com>
---
drivers/iommu/arm-smmu-v3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 7d3f08a..182eb38 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -2736,6 +2736,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
iommu_device_set_fwnode(&smmu->iommu, dev->fwnode);
ret = iommu_device_register(&smmu->iommu);
+ if (ret)
+ return ret;
#ifdef CONFIG_PCI
if (pci_bus_type.iommu_ops != &arm_smmu_ops) {
--
1.9.1
More information about the linux-arm-kernel
mailing list