Received: by 10.223.185.116 with SMTP id b49csp1097950wrg; Fri, 23 Feb 2018 11:54:31 -0800 (PST) X-Google-Smtp-Source: AH8x226QUHk6NL1JLsyeCh2W80ckMWINrniPwlVmPb/1TRWbPpQS+WBDpiKTkSpUgvQqa9hwMbGo X-Received: by 10.99.133.193 with SMTP id u184mr2197545pgd.401.1519415671424; Fri, 23 Feb 2018 11:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415671; cv=none; d=google.com; s=arc-20160816; b=EgREHf6ksSmLKWt5aQQtOutGz2MvNUdfnFLi75mWhli2P7WwQKTgj5GGTNL41HoN1Z b/4wImnK8k+6BmnE9DFNsVTojdKLlOjOQ/VUAZUsBEgyxz5XOdn6XlPwuBFgKH3PO7IL VuOwdFhHEmZiL3vXaFwE/cdlSpxGz5PI0otyGbsWxY329VJqNtcDPfrTJjYrVI1E49ZQ ayLopaOqbzgTm7Parm06Glo3FUqIV0DfmvOGglmL4j8PDARvIAkWgKuAJuUl847iTjrI 4IPXWKMaXeF3LyFHRbzuk2UFIOMpjIfXCup3enVmjJqL0OfjuhT1udSDZtPJzU/YFO+p Er/A== 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=xzzwYZ8rTNsG6BFybiuffHAxL801GpwPiugiExr/0jM=; b=Sof4MKUVDuacYCBNx7x3VPT2qpx6UKftY68Vt8ci2jwRhvQ7n2a+Jc5Orr6BlgsTre KUvBi+IE4pZYpYyl7Km2/N5JpgxBDXb27Y1e3JBgEoHIXrxqb+AkZioh/gk4L4DyTlZB DvS3fDH5ScUzPWG0fcIkVM+IK2pc7m+PiNSh9Gy07Rk3SM894AEpTyslijWMm9KNh+Bc Hmj71kbn674kqsAFK/eckv46QkiA84Q0yq22UfdzkqtYFybgk15uhljXNeieit5ZBOc/ lzBdqN3J+y7KiWBXkxQUQTX+MSPr4mbqoXmh34ZvECFXawyGNEUlXIPrnSCtUCA0sVNl SpQw== 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 b13si2236467pfi.53.2018.02.23.11.54.16; Fri, 23 Feb 2018 11:54:31 -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 S1754923AbeBWTwB (ORCPT + 99 others); Fri, 23 Feb 2018 14:52:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43446 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933872AbeBWSpr (ORCPT ); Fri, 23 Feb 2018 13:45:47 -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 99D271261; Fri, 23 Feb 2018 18:45:46 +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.9 079/145] dmaengine: jz4740: disable/unprepare clk if probe fails Date: Fri, 23 Feb 2018 19:26:25 +0100 Message-Id: <20180223170734.947559180@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-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 @@ -555,7 +555,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); @@ -568,6 +568,8 @@ static int jz4740_dma_probe(struct platf err_unregister: dma_async_device_unregister(dd); +err_clk: + clk_disable_unprepare(dmadev->clk); return ret; }