public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi-gpio: Fix returned error code
@ 2008-07-26 12:18 Michael Buesch
  0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2008-07-26 12:18 UTC (permalink / raw)
  To: Andrew Morton; +Cc: David Brownell, linux-kernel, Torgil Svensson

This fixes the returned error code in case spi_new_device failed.

Reported-by: Torgil Svensson <torgil.svensson@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>


Index: linux-next/drivers/spi/spi_gpio.c
===================================================================
--- linux-next.orig/drivers/spi/spi_gpio.c	2008-07-26 14:16:32.000000000 +0200
+++ linux-next/drivers/spi/spi_gpio.c	2008-07-26 14:16:54.000000000 +0200
@@ -167,6 +167,7 @@ static int spi_gpio_probe(struct platfor
 	if (err)
 		goto err_bi_setup;
 	sp->bi.controller_data = sp;
+	err = -ENOMEM;
 	spidev = spi_new_device(master, &sp->bi);
 	if (!spidev)
 		goto err_new_dev;

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-26 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-26 12:18 [PATCH] spi-gpio: Fix returned error code Michael Buesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox