Commit 2a3df922 authored by Asutosh Das's avatar Asutosh Das Committed by Sandeep Dhavale
Browse files

UPSTREAM: ufs: mcq: qcom: Fix passing zero to PTR_ERR



Fix an error case in ufs_qcom_mcq_config_resource(), where the
return value is set to 0 before passing it to PTR_ERR.

This led to Smatch warning:
drivers/ufs/host/ufs-qcom.c:1455 ufs_qcom_mcq_config_resource() warn:
passing zero to 'PTR_ERR'

Fixes: c263b4ef ("scsi: ufs: core: mcq: Configure resource regions")
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarAsutosh Das <quic_asutoshd@quicinc.com>
https://lore.kernel.org/r/94ca99b327af634799ce5f25d0112c28cd00970d.1677721072.git.quic_asutoshd@quicinc.com


Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
Reviewed-by: default avatarManivannan Sadhasivam <mani@kernel.org>

Bug: 279870970
Change-Id: I680f80a0ba6f72e2d3fde9d7bcf2d1d29d686133
(cherry picked from commit c8be073b)
Signed-off-by: default avatarXiaosen He <quic_xiaosenh@quicinc.com>
parent 2928fad5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment