diff options
author | Can Guo <cang@codeaurora.org> | 2019-12-05 03:14:33 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-12-20 04:08:53 +0100 |
commit | 17c7d35f141ef6158076adf3338f115f64fcf760 (patch) | |
tree | 74d999c18c257a3d697ceaa92db13d772a4f0f3f /drivers/scsi | |
parent | scsi: ufs: Use DBD setting in mode sense (diff) | |
download | linux-17c7d35f141ef6158076adf3338f115f64fcf760.tar.xz linux-17c7d35f141ef6158076adf3338f115f64fcf760.zip |
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]
Link: https://lore.kernel.org/r/0101016ed3d66395-1b7e7fce-b74d-42ca-a88a-4db78b795d3b-000000@us-west-2.amazonses.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0aa42b68dab6..64abb30d990a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2450,6 +2450,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) err = ufshcd_map_sg(hba, lrbp); if (err) { lrbp->cmd = NULL; + ufshcd_release(hba); goto out; } /* Make sure descriptors are ready before ringing the doorbell */ |