diff options
| author | Chanwoo Lee <cw9316.lee@samsung.com> | 2026-05-27 18:21:34 +0900 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2026-06-01 21:59:00 -0400 |
| commit | 2483ae0a56231a915c706411421c6c002a2bf83e (patch) | |
| tree | 51fa3b131c2b93346ee69bc8d59c27e0fa19f91c /drivers/ufs | |
| parent | 4cf752f6b99ab63506cde5a611d4219e97adbd84 (diff) | |
| download | linux-next-2483ae0a56231a915c706411421c6c002a2bf83e.tar.gz linux-next-2483ae0a56231a915c706411421c6c002a2bf83e.zip | |
scsi: ufs: Fix wrong value printed in unexpected UPIU response case
In ufshcd_transfer_rsp_status(), the default case of the inner switch
statement prints the UPIU response code when an unexpected response is
received. However, the code was printing 'result' variable which is
always 0 at that point, making the error message useless for debugging.
Fix this by printing the actual UPIU response code returned by
ufshcd_get_req_rsp().
Fixes: 08108d31129a ("scsi: ufs: Improve type safety")
Signed-off-by: Chanwoo Lee <cw9316.lee@samsung.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260527092134.275887-1-cw9316.lee@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
| -rw-r--r-- | drivers/ufs/core/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 9b6cb6b569bc..3441e874eacc 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5716,7 +5716,7 @@ static inline int ufshcd_transfer_rsp_status(struct ufs_hba *hba, default: dev_err(hba->dev, "Unexpected request response code = %x\n", - result); + ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr)); result = DID_ERROR << 16; break; } |
