Message ID | 1557477738-20634-1-git-send-email-na-hoan@jinso.co.jp (mailing list archive) |
---|---|
State | Accepted |
Commit | bfada2080b6439e997bfeae43ed73a3e41c351fd |
Headers | show |
Series | spi: bcm2835: Remove spi_alloc_master() error printing | expand |
On Fri, May 10, 2019 at 10:44 AM Nguyen An Hoan <na-hoan@jinso.co.jp> wrote: > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > Printing an error on memory allocation failure is unnecessary, > as the memory allocation core code already takes care of that. > > Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
Hi, On 10.05.19 10:42, Nguyen An Hoan wrote: > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > Printing an error on memory allocation failure is unnecessary, > as the memory allocation core code already takes care of that. > > Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> looks like more spi drivers are affected. Could you please take care at least of spi-bcm2835aux ? Stefan
Dear Mr. Stefan! On 2019/05/10 18:05, Stefan Wahren wrote: > Hi, > > On 10.05.19 10:42, Nguyen An Hoan wrote: >> From: Hoan Nguyen An <na-hoan@jinso.co.jp> >> >> Printing an error on memory allocation failure is unnecessary, >> as the memory allocation core code already takes care of that. >> >> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> > looks like more spi drivers are affected. > > Could you please take care at least of spi-bcm2835aux ? Thanks! I have just updated it! Thank You!
> On 10.05.2019, at 10:42, Nguyen An Hoan <na-hoan@jinso.co.jp> wrote: > > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > Printing an error on memory allocation failure is unnecessary, > as the memory allocation core code already takes care of that. > > Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> Reviewed-by: Martin Sperl <kernel@martin.sperl.org>
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 35aebdf..0b779c2 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -932,10 +932,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev) int err; master = spi_alloc_master(&pdev->dev, sizeof(*bs)); - if (!master) { - dev_err(&pdev->dev, "spi_alloc_master() failed\n"); + if (!master) return -ENOMEM; - } platform_set_drvdata(pdev, master);