iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe
Subsystems (4)
PATCH 1/1 iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe
If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable().
Add missing pm_runtime_disable() for error handling.
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/iommu/arm/arm-smmu/qcom_iommu.c +7 -3
@@ -827,20 +827,20 @@ static int qcom_iommu_device_probe(struct platform_device *pdev) ret =devm_of_platform_populate (dev);if (ret) {dev_err (dev,"Failed to populate iommu contexts\n" ); -return ret; + goto err_pm_disable; } ret =iommu_device_sysfs_add (&qcom_iommu->iommu, dev,NULL ,dev_name (dev));if (ret) {dev_err (dev,"Failed to register iommu in sysfs\n" ); -return ret; + goto err_pm_disable; } ret =iommu_device_register (&qcom_iommu->iommu, &qcom_iommu_ops, dev);if (ret) {dev_err (dev,"Failed to register iommu\n" ); -return ret; + goto err_pm_disable; }bus_set_iommu (&platform_bus_type, &qcom_iommu_ops);
@@ -852,6 +852,10 @@ static int qcom_iommu_device_probe(struct platform_device *pdev) }return 0 ; + +err_pm_disable: +pm_runtime_disable (dev); +return ret; }static int qcom_iommu_device_remove (struct platform_device *pdev)
Signature · 1 line
2.17.1
Quoted 5 lines · Miaoqian Lin
If the probe fails, we should use
pm_runtime_disable()to balancepm_runtime_enable().
Add missingpm_runtime_disable()for error handling.
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/1] iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe
https://git.kernel.org/will/c/93665e0275a2
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev