Received: by 10.223.185.116 with SMTP id b49csp1136625wrg; Fri, 23 Feb 2018 12:34:50 -0800 (PST) X-Google-Smtp-Source: AH8x227SHIGT0z584EX1Pepelgd0i54MrRxMyFVhRZ2u1lJpdOrxl1v/ZGhUW+1zR1HKId+gcP2m X-Received: by 10.101.70.203 with SMTP id n11mr2258247pgr.377.1519418089887; Fri, 23 Feb 2018 12:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418089; cv=none; d=google.com; s=arc-20160816; b=En13w8fTxhDAKTdLniBweu4gwDwwlE17CkE8xeUwnctdqqfaD3qLRvLpzXNG8v1pAV OSIYNCobjgLSBuc1uz4ALGfqSsKv36s9BA370wFr5wPDVGmulqT7q4bPvFYFQq569xH0 4EAIGMYvj0kekE1+5FyFc7UbDjjLtZmGh3RLl94wOIM81bZS5FcXCJpC8/z+kYvyNDQx JBMDHgqVhz5p9o8dNudVXVEj6Su33xv35yb0S+LWe3HAhVmNaioDmS7A1ogwpdNLELy0 dsZXPqiCDrzw5wRqOgVKxnSM4D4E1hu9zBLFNxHsigfaIdheGVyloKBECgD/M8MOtF1K MQZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aHigSq6gE1xl+LHVShOTqsK+GI+oor2HDSnbePRQhAE=; b=l824PQL4cNTVyVAOBdewwoVJdFFwY7Y9nyuMbXwqw0EL516W1o4V5EInEsHKLYO0mO xNXaAUhgJApts3qPPnDNqZ1X4mgYPEZ3oYW8mna6fWdMVR/GGgA43ol8hew2E70951ev LRgwI/zsHmio4ad4PI4uBBGzURCMM1Cw8BU7Tl2d3HXDVIEHwEZ1jgBoEp63QFRuIZHy Ke0Q3o4G+mv0+BIGV6o27G8mMncFa01x86VKrS+JlggVOqXOxsMafsv4TuQy2yx1wnL8 FjTn3sC8ZBP3b+bwaWq9Ud9zu5QsOXK0+yvVQ2B46UA3WkV3oFOhZG9JBobMnPKn3v0V nS1g== 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 a62si1939149pgc.70.2018.02.23.12.34.35; Fri, 23 Feb 2018 12:34:49 -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 S1753972AbeBWUeA (ORCPT + 99 others); Fri, 23 Feb 2018 15:34:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37208 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbeBWSfR (ORCPT ); Fri, 23 Feb 2018 13:35:17 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4C4D111D8; Fri, 23 Feb 2018 18:35:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Jordan , Vinod Koul , Sasha Levin Subject: [PATCH 4.4 057/193] dmaengine: jz4740: disable/unprepare clk if probe fails Date: Fri, 23 Feb 2018 19:24:50 +0100 Message-Id: <20180223170334.928949847@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan [ Upstream commit eb9436966fdc84cebdf222952a99898ab46d9bb0 ] 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: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- 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 @@ -557,7 +557,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); @@ -570,6 +570,8 @@ static int jz4740_dma_probe(struct platf err_unregister: dma_async_device_unregister(dd); +err_clk: + clk_disable_unprepare(dmadev->clk); return ret; }