[{"id":1771359,"web_url":"http://patchwork.ozlabs.org/comment/1771359/","msgid":"<20170919221315.11d94426@bbrezillon>","list_archive_url":null,"date":"2017-09-19T20:13:15","subject":"Re: [PATCH] mtd: nand: lpc32xx_mlc: Fix an error handling path in\n\tlpc32xx_nand_probe()","submitter":{"id":63120,"url":"http://patchwork.ozlabs.org/api/people/63120/","name":"Boris Brezillon","email":"boris.brezillon@free-electrons.com"},"content":"On Sun,  3 Sep 2017 13:58:31 +0200\nChristophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:\n\n> If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.\n> \n> Fixes: 4d26f012ab59 (\"mtd: nand: lpc32xx_mlc: Handle return value of clk_prepare_enable.\")\n> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>\n\nApplied.\n\nThanks,\n\nBoris\n\n> ---\n> Labels in the error handling path could be renamed, but it does not worth\n> the effort, IMHO.\n> ---\n>  drivers/mtd/nand/lpc32xx_mlc.c | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c\n> index c3bb358ef01e..5f72a824e67d 100644\n> --- a/drivers/mtd/nand/lpc32xx_mlc.c\n> +++ b/drivers/mtd/nand/lpc32xx_mlc.c\n> @@ -707,7 +707,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)\n>  \t}\n>  \tres = clk_prepare_enable(host->clk);\n>  \tif (res)\n> -\t\tgoto err_exit1;\n> +\t\tgoto err_put_clk;\n>  \n>  \tnand_chip->cmd_ctrl = lpc32xx_nand_cmd_ctrl;\n>  \tnand_chip->dev_ready = lpc32xx_nand_device_ready;\n> @@ -814,6 +814,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)\n>  \t\tdma_release_channel(host->dma_chan);\n>  err_exit2:\n>  \tclk_disable_unprepare(host->clk);\n> +err_put_clk:\n>  \tclk_put(host->clk);\n>  err_exit1:\n>  \tlpc32xx_wp_enable(host);","headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"JUmWQ8jl\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxYxq70jZz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 06:14:39 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duOud-0000u5-UN; Tue, 19 Sep 2017 20:14:31 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duOtw-00007b-47; Tue, 19 Sep 2017 20:14:06 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid EEE242098F; Tue, 19 Sep 2017 22:13:26 +0200 (CEST)","from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id A1A4220899;\n\tTue, 19 Sep 2017 22:13:16 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=UnoAr6IeNa1knmi1Llq+9bYmrGYEkxuS0xzpOlK0Mms=;\n\tb=JUmWQ8jlPI4AQ5\n\to2RPTR2SfIgV/buxSssdp4RzSJTqEjEpWxrwaOeBsC+s+eW6lDLcIcKEsN4q7dlznLnnrin6XBH7F\n\tFNpel/jblLWJVj/34hTgLAuPv4XsN2TqO8G65erNhruUgqtf+9sUFBx0hYag2XcA4Jp66c0UAUD/I\n\tadBEgA8y3jNeSNtKVxJKEy9CD2nz/ENKk3O9611cQMPHj4ez4+t6LN4a5MilLuPSyticpy+e+wM+N\n\tNxpFGrRMOb+aDlfmL2mqQAzYIVvU7jTu53GibZQ3nOqWg294nwl0JdrpDioYvL676Hu32EZMDv3/c\n\ty53K8m0j1hgzFhW2UDIw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.4.0","Date":"Tue, 19 Sep 2017 22:13:15 +0200","From":"Boris Brezillon <boris.brezillon@free-electrons.com>","To":"Christophe JAILLET <christophe.jaillet@wanadoo.fr>","Subject":"Re: [PATCH] mtd: nand: lpc32xx_mlc: Fix an error handling path in\n\tlpc32xx_nand_probe()","Message-ID":"<20170919221315.11d94426@bbrezillon>","In-Reply-To":"<20170903115831.1326-1-christophe.jaillet@wanadoo.fr>","References":"<20170903115831.1326-1-christophe.jaillet@wanadoo.fr>","X-Mailer":"Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_131348_921657_0D74F271 ","X-CRM114-Status":"GOOD (  13.54  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"richard@nod.at, slemieux.tyco@gmail.com, kernel-janitors@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, vz@mleia.com, marek.vasut@gmail.com,\n\tlinux-mtd@lists.infradead.org, cyrille.pitchen@wedev4u.fr,\n\tcomputersforpeace@gmail.com, dwmw2@infradead.org,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]