Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1197164ybx; Fri, 1 Nov 2019 18:24:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMy59BxOLzpqDRzju7iIXSllIc1QxIK99iJDdUw4Se+Lm0TYTE+i0rgFU9jV+j85nGHIdk X-Received: by 2002:a05:6402:2d6:: with SMTP id b22mr16387564edx.155.1572657888451; Fri, 01 Nov 2019 18:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572657888; cv=none; d=google.com; s=arc-20160816; b=Rf4SzDjuoSdhRgs4ySCJ2sp0rjsmo+gVFyR0+MDizN2fJJ56QBckedsvkCWXS/NC5C NEDTrFtdILAVTQ9POVcpXngkcKemEmsrrLULt069Kh50Gsr/BuEjtLr8BbbHtbUAQTnU 4YN3hCaR36KfZwykTcvkEKp9n1QMdAZtEOBwBbddETlINVwWfxFLImMCZVdXaes3VUC7 cIoo0hf9LSGL4UldlaRumWl9qnfZBctiMhEWqT0T2kQO3TJoT3KC57LUQPiPnCst/Xap agHf5c91rVOPJdxyVrJ1EeIqVmHkc/yCY0qRy5SzRgN1+Y6wPowhESsqfWxJswpgAC7p Dhmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter; bh=t1U7bsqzboAiRLFtzmTvehT29d5FC6c6HRIAbrF4USU=; b=l+sdnHrJItBPtIUYd85rNJWReLmuPKpUJO7ru5qWLkC4cU5ne5Ff0Cb6GkDbMPyf7K J2J94wAK91bOY6Wst7UY2wQPSXQ1pN9tAhS6a5mxsT89E5rwYEDAts4b1rWUk/2LSs5/ pXJI3dpFohbqBa4Da0HMiZ6w1geuJuB3cVaPHgtpo4qC0ZuEhFkAz5JxW3OqpbLZU5JT PY/ADj+3WQgDpV2uik3mI/iIXXi4lzBrUufG7WrOKn0QcQzGTkXjnLcvnPbvOOf6LZCC char3ZGQsVFJXsVJmIjy20iaCtqxOy1GA81wu96tTSlBp5qsA5hO+1BvgrRnU3Mwdcc5 AD/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si1860561edj.43.2019.11.01.18.24.24; Fri, 01 Nov 2019 18:24:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728433AbfKBBU4 (ORCPT + 99 others); Fri, 1 Nov 2019 21:20:56 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33658 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbfKBBUz (ORCPT ); Fri, 1 Nov 2019 21:20:55 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 09EB961603; Sat, 2 Nov 2019 01:20:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cang@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 955EE615DC; Sat, 2 Nov 2019 01:20:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 955EE615DC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=pass (p=none dis=none) header.from=qti.qualcomm.com Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=cang@qti.qualcomm.com From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Subhash Jadavani , Tomas Winkler , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/5] scsi: ufs: Release clock if DMA map fails Date: Fri, 1 Nov 2019 18:20:28 -0700 Message-Id: <1572657631-25749-4-git-send-email-cang@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1572657631-25749-1-git-send-email-cang@qti.qualcomm.com> References: <1572657631-25749-1-git-send-email-cang@qti.qualcomm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Can Guo In queuecommand path, if DMA map fails, it bails out with clock held. In this case, release the clock to keep its usage paired. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0a6b8f9..979b161 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2504,6 +2504,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; } /* Make sure descriptors are ready before ringing the doorbell */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project