Skip to content

Commit ce36c94

Browse files
mszyprowjoergroedel
authored andcommitted
iommu/qcom: Revert "iommu/arm: Cleanup resources in case of probe error path"
QCOM IOMMU driver calls bus_set_iommu() for every IOMMU device controller, what fails for the second and latter IOMMU devices. This is intended and must be not fatal to the driver registration process. Also the cleanup path should take care of the runtime PM state, what is missing in the current patch. Revert relevant changes to the QCOM IOMMU driver until a proper fix is prepared. This partially reverts commit 249c9dc. Fixes: 249c9dc ("iommu/arm: Cleanup resources in case of probe error path") Suggested-by: Will Deacon <will@kernel.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210705065657.30356-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent e73f0f0 commit ce36c94

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

drivers/iommu/arm/arm-smmu/qcom_iommu.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -849,12 +849,10 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
849849
ret = iommu_device_register(&qcom_iommu->iommu, &qcom_iommu_ops, dev);
850850
if (ret) {
851851
dev_err(dev, "Failed to register iommu\n");
852-
goto err_sysfs_remove;
852+
return ret;
853853
}
854854

855-
ret = bus_set_iommu(&platform_bus_type, &qcom_iommu_ops);
856-
if (ret)
857-
goto err_unregister_device;
855+
bus_set_iommu(&platform_bus_type, &qcom_iommu_ops);
858856

859857
if (qcom_iommu->local_base) {
860858
pm_runtime_get_sync(dev);
@@ -863,13 +861,6 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
863861
}
864862

865863
return 0;
866-
867-
err_unregister_device:
868-
iommu_device_unregister(&qcom_iommu->iommu);
869-
870-
err_sysfs_remove:
871-
iommu_device_sysfs_remove(&qcom_iommu->iommu);
872-
return ret;
873864
}
874865

875866
static int qcom_iommu_device_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)