Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594823
| From | Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mtd: spi-nor: hisi: do not ignore clk_prepare_enable() failure |
| Date | 2017-03-08 04:40 +0100 |
| Message-ID | <tiACd-CV-1@gated-at.bofh.it> (permalink) |
| References | <tbZ2F-1LE-9@gated-at.bofh.it> <tcf7s-3zv-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <khoroshilov@ispras.ru> > > Acked-by: Marek Vasut <marek.vasut@gmail.com> > 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) >> > >
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] mtd: spi-nor: hisi: do not ignore clk_prepare_enable() failure Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> - 2017-03-08 04:40 +0100
csiph-web