Commit 3a747c5c authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Martin K. Petersen

scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails

The return value should be -ENODEV indicating that the resource is not
provided in DT, not -ENOMEM. Fix it!

Fixes: c263b4ef ("scsi: ufs: core: mcq: Configure resource regions")
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20231208065902.11006-4-manivannan.sadhasivam@linaro.org
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3bf7ab4a
...@@ -1701,7 +1701,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba) ...@@ -1701,7 +1701,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
if (!res->resource) { if (!res->resource) {
dev_info(hba->dev, "Resource %s not provided\n", res->name); dev_info(hba->dev, "Resource %s not provided\n", res->name);
if (i == RES_UFS) if (i == RES_UFS)
return -ENOMEM; return -ENODEV;
continue; continue;
} else if (i == RES_UFS) { } else if (i == RES_UFS) {
res_mem = res->resource; res_mem = res->resource;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment