scsi: ufs: Fix a possible use before initialization case
Subsystems (2)
PATCH v2 1/1 scsi: ufs: Fix a possible use before initialization case
In ufshcd_exec_dev_cmd(), if error happens before lrpb is initialized, then we should bail out instead of letting trace record the error.
Fixes a45f937110fa6 ("scsi: ufs: Optimize host lock on transfer requests send/compl paths")
Reported-by kernel test robot <[email protected]>
Reviewed-by Stanley Chu <[email protected]>
Signed-off-by Can Guo <[email protected]>
---
Change since V1:
- Use codeaurora mail in Signed-off-by tag.
drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +1 -1
@@ -2972,7 +2972,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,if (unlikely (test_bit (tag, &hba->outstanding_reqs))) { err = -EBUSY ; - goto out; + goto out_put_tag; }init_completion (&wait);
Signature · 1 line
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.