Message ID | 201307021009.00176.hartleys@visionengravers.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Tue, Jul 02, 2013 at 10:08:59AM -0700, H Hartley Sweeten wrote: > The kzalloc() failure will have already output a message. > > Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> > Cc: Ryan Mallon <rmallon@gmail.com> > Cc: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index c1a610e..34aade1 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c @@ -1004,10 +1004,8 @@ static int ep93xx_spi_probe(struct platform_device *pdev) } master = spi_alloc_master(&pdev->dev, sizeof(*espi)); - if (!master) { - dev_err(&pdev->dev, "failed to allocate spi master\n"); + if (!master) return -ENOMEM; - } master->setup = ep93xx_spi_setup; master->transfer = ep93xx_spi_transfer;
The kzalloc() failure will have already output a message. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Mika Westerberg <mika.westerberg@iki.fi> Cc: Mark Brown <broonie@kernel.org> Cc: Grant Likely <grant.likely@linaro.org> --- drivers/spi/spi-ep93xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)