Skip to content

Commit

Permalink
scsi: ufs: qcom: Fix the return value when platform_get_resource_byna…
Browse files Browse the repository at this point in the history
…me() fails

[ Upstream commit 3a747c5 ]

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

Fixes: c263b4e ("scsi: ufs: core: mcq: Configure resource regions")
Reviewed-by: Andrew Halaney <[email protected]>
Signed-off-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Andrew Halaney <[email protected]> # sa8775p-ride
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Mani-Sadhasivam authored and gregkh committed Jan 25, 2024
1 parent 8f67e87 commit 8d8f671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ufs/host/ufs-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
if (!res->resource) {
dev_info(hba->dev, "Resource %s not provided\n", res->name);
if (i == RES_UFS)
return -ENOMEM;
return -ENODEV;
continue;
} else if (i == RES_UFS) {
res_mem = res->resource;
Expand Down

0 comments on commit 8d8f671

Please sign in to comment.