Received: by 10.223.185.116 with SMTP id b49csp6380166wrg; Wed, 28 Feb 2018 08:27:57 -0800 (PST) X-Google-Smtp-Source: AH8x2265f9/s9zsjbfaljamnJEuu2qAsmV6TwxBSaFvRDdfiWi6HAZjAb4j5UtdbHCP0u2xmp5tJ X-Received: by 2002:a17:902:b210:: with SMTP id t16-v6mr18447261plr.373.1519835277663; Wed, 28 Feb 2018 08:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835277; cv=none; d=google.com; s=arc-20160816; b=0Ffileq1Lm8vZCzXPF8cQ6ZOwvhhz+iFxJvvq78F69/58XnT7rrpia4OKk5/3MGcVW wYTONbERld889CZjRBPsMV15brlg8dN/LCQ6LcmMgb8PZ2UfM0GZm8jMTxlrPjb+FDpS EHRk1KDCAA9dfgNNW/iUP6GXF7N/dguNXnoUYh0ftvLV36B4WQoXCS5pH6VJFfEOxBOj K71KSknFk6HkSAbCWiMbr3vF2iR93jkoTkZz3/3SiVP0jJAqQeRpBr+sc+I8uZe0+7sY kxAMmrY9xWPYN6JveeQtnvcjFCOyn50plTqJlG9lkTG5qrxeM/ZqyMXI3LoCJr3NyVD0 F61Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=VBusRPZk1amBCD2Wsop692Y2eYw5/pyytYFiyxKMhQ4=; b=pdmeAmKxSPEa5dlZiXrjMz2NJiDzc69nzSRoA3HPpTAtOTS9aY7LhMf10ODjpMp17A j10iPR3tW4YEtxxs7/vAUSo54yWaxwhAmT5Rm7L4XHUO8qnWQHmia1v2+LikaB9YEbkI B99l2r1BdZzHN7TYhSLBqY38VJr3vR9m0U0NUOABCh1apnNL3ZM5+umeJTtqh9v/K8KH Qzby1ZBeq6QAze4+KWKe5gPnkkJzUVvWNozP12svRsvgbSYSS/Mi2UT+iQs+uRBrYGfu Nn+mIPmG0NnRhC6/WO3PIP+7Uvm4o6RLrNHLpCJiE97tNcA8bnU1heFgloRirXE6jZ52 oUtQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z96-v6si1511421plh.35.2018.02.28.08.27.42; Wed, 28 Feb 2018 08:27:57 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934949AbeB1Q1F (ORCPT + 99 others); Wed, 28 Feb 2018 11:27:05 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35205 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933835AbeB1QP6 (ORCPT ); Wed, 28 Feb 2018 11:15:58 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yt-0006Xb-HY; Wed, 28 Feb 2018 15:22:31 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yf-0008VB-Ko; Wed, 28 Feb 2018 15:22:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Vinod Koul" , "Tobias Jordan" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 084/254] dmaengine: jz4740: disable/unprepare clk if probe fails In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan commit eb9436966fdc84cebdf222952a99898ab46d9bb0 upstream. in error path of jz4740_dma_probe(), call clk_disable_unprepare() to clean up. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 25ce6c35fea0 MIPS: jz4740: Remove custom DMA API Signed-off-by: Tobias Jordan Signed-off-by: Vinod Koul Signed-off-by: Ben Hutchings --- drivers/dma/dma-jz4740.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c @@ -574,7 +574,7 @@ static int jz4740_dma_probe(struct platf ret = dma_async_device_register(dd); if (ret) - return ret; + goto err_clk; irq = platform_get_irq(pdev, 0); ret = request_irq(irq, jz4740_dma_irq, 0, dev_name(&pdev->dev), dmadev); @@ -587,6 +587,8 @@ static int jz4740_dma_probe(struct platf err_unregister: dma_async_device_unregister(dd); +err_clk: + clk_disable_unprepare(dmadev->clk); return ret; }