Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ec369a0 authored by Can Guo's avatar Can Guo Committed by Todd Kjos
Browse files

FROMGIT: scsi: ufs: Release clock if DMA map fails

In queuecommand path, if DMA map fails, it bails out with clock held.  In
this case, release the clock to keep its usage paired.

[mkp: applied by hand]

Bug: 143632303
(cherry picked from commit 4339bc814224e58be93c7e7b369dd457d440d5fe
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 5.6/scsi-queue)
Change-Id: I57f12489405528d7766798ec6656e45d6413177d
Link: https://lore.kernel.org/r/0101016ed3d66395-1b7e7fce-b74d-42ca-a88a-4db78b795d3b-000000@us-west-2.amazonses.com


Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 971fe3b4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2503,6 +2503,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)

	err = ufshcd_map_sg(hba, lrbp);
	if (err) {
		ufshcd_release(hba);
		lrbp->cmd = NULL;
		clear_bit_unlock(tag, &hba->lrb_in_use);
		goto out;