mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
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: 109bd48ea2 ("iommu/msm: Add DT adaptation")
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
8cdeaa50ea
commit
b0d50c9016
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user