]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
scsi: ufs: mcq: qcom: Fix passing zero to PTR_ERR
authorAsutosh Das <quic_asutoshd@quicinc.com>
Thu, 2 Mar 2023 01:41:06 +0000 (17:41 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 6 Mar 2023 23:33:12 +0000 (18:33 -0500)
commitc8be073bd2bced20f58e65276281fc116758c7cb
treedee406da9d0285846d648a8972b9c3aa81f47509
parentfa8d32721a07d1349d963832400e97ebb515aa96
scsi: 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: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
Link: https://lore.kernel.org/r/94ca99b327af634799ce5f25d0112c28cd00970d.1677721072.git.quic_asutoshd@quicinc.com
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c