Skip to contentSkip to conversation

spi-gpio: Fix returned error code

PATCH New Michael Buesch 1 participant 1 message Jul 26, 2008 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi-gpio: Fix returned error code

This fixes the returned error code in case spi_new_device failed.

drivers/spi/spi_gpio.c +1 -0
Index: linux-next/drivers/spi/spi_gpio.c
===================================================================
@@ -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;
Signature · 1 line
Greetings Michael.