iommu/msm: Return -ENOMEM on memory allocation failure in probe
Subsystems (3)
PATCH 1/1 iommu/msm: Return -ENOMEM on memory allocation failure in probe
If dynamic memory allocation in driver's probe function execution fails, it should be reported to the driver's framework with -ENOMEM error code.
Fixes 109bd48ea2e1 ("iommu/msm: Add DT adaptation")
Signed-off-by Vladimir Zapolskiy <[email protected]>
--- drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/msm_iommu.c +1 -1
@@ -720,7 +720,7 @@ static int msm_iommu_probe(struct platform_device *pdev) iommu =devm_kzalloc (&pdev->dev,sizeof (*iommu),GFP_KERNEL );if (!iommu) -return -ENODEV ; +return -ENOMEM ; iommu->dev = &pdev->dev;INIT_LIST_HEAD (&iommu->ctx_list);
Signature · 1 line
2.51.0
Quoted 6 lines · Vladimir Zapolskiy
If dynamic memory allocation in driver's probe function execution fails, it should be reported to the driver's framework with
-ENOMEMerror code.Fixes 109bd48ea2e1 ("iommu/msm: Add DT adaptation")Signed-off-by Vladimir Zapolskiy <[email protected]>---
Reviewed-by Konrad Dybcio <[email protected]>
Konrad
Quoted 9 lines · Vladimir Zapolskiy
If dynamic memory allocation in driver's probe function execution fails, it should be reported to the driver's framework with
-ENOMEMerror code.Fixes 109bd48ea2e1 ("iommu/msm: Add DT adaptation")Signed-off-by Vladimir Zapolskiy <[email protected]>--- drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Dmitry Baryshkov <[email protected]>
Signature · 2 lines
With best wishes Dmitry
Quoted 2 lines · Vladimir Zapolskiy
drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.