Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756718AbdCHDb6 (ORCPT ); Tue, 7 Mar 2017 22:31:58 -0500 Received: from 7.mo2.mail-out.ovh.net ([188.165.48.182]:48881 "EHLO 7.mo2.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756695AbdCHDb4 (ORCPT ); Tue, 7 Mar 2017 22:31:56 -0500 X-Greylist: delayed 19969 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Mar 2017 22:31:51 EST Subject: Re: [PATCH] mtd: spi-nor: hisi: do not ignore clk_prepare_enable() failure To: Marek Vasut , Alexey Khoroshilov , Cyrille Pitchen References: <1487369297-5810-1-git-send-email-khoroshilov@ispras.ru> <0066fec2-492a-52de-3c2e-ebce4b9f452a@gmail.com> Cc: ldv-project@linuxtesting.org, Boris Brezillon , Richard Weinberger , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse From: Cyrille Pitchen Message-ID: <483ebb87-1b22-be6a-780d-66b73cdaff72@wedev4u.fr> Date: Tue, 7 Mar 2017 21:57:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <0066fec2-492a-52de-3c2e-ebce4b9f452a@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2212674795269478245 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelhedrgedvgddugeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1094 Lines: 39 Le 18/02/2017 ? 16:23, Marek Vasut a ?crit : > On 02/17/2017 11:08 PM, Alexey Khoroshilov wrote: >> hisi_spi_nor_probe() ignores clk_prepare_enable() error code. >> The patch fixes that. >> >> Found by Linux Driver Verification project (linuxtesting.org). >> >> Signed-off-by: Alexey Khoroshilov > > Acked-by: Marek Vasut > Applied to spi-nor/next Thanks! >> --- >> drivers/mtd/spi-nor/hisi-sfc.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mtd/spi-nor/hisi-sfc.c b/drivers/mtd/spi-nor/hisi-sfc.c >> index 20378b0d55e9..a286350627a6 100644 >> --- a/drivers/mtd/spi-nor/hisi-sfc.c >> +++ b/drivers/mtd/spi-nor/hisi-sfc.c >> @@ -448,8 +448,11 @@ static int hisi_spi_nor_probe(struct platform_device *pdev) >> if (!host->buffer) >> return -ENOMEM; >> >> + ret = clk_prepare_enable(host->clk); >> + if (ret) >> + return ret; >> + >> mutex_init(&host->lock); >> - clk_prepare_enable(host->clk); >> hisi_spi_nor_init(host); >> ret = hisi_spi_nor_register_all(host); >> if (ret) >> > >