ANDROID: scsi: ufs: Handle clocks when lrbp fails

Release UFS clocks when ufshcd_prepare_lrbp_crypto fails
for any reason.
Bug: 157284579.

Change-Id: I1dd28ffea9379b58c55a948a6365e0b153249516
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
This commit is contained in:
Gaurav Kashyap 2020-05-22 13:45:18 -07:00 • committed by Gerrit - the friendly Code Review server
commit 9e7a7ecdc7
2 changed files with 2 additions and 0 deletions

View file

@ -3191,6 +3191,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
if (err) {
lrbp->cmd = NULL;
clear_bit_unlock(tag, &hba->lrb_in_use);
ufshcd_release_all(hba);
goto out;
}
lrbp->req_abort_skip = false;

View file

@ -2585,6 +2585,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
if (err) {
lrbp->cmd = NULL;
clear_bit_unlock(tag, &hba->lrb_in_use);
ufshcd_release(hba);
goto out;
}
lrbp->req_abort_skip = false;