pxa2xx_spi: prevent panic case setup() fails
for 2.6.30 please
---------- Forwarded Message ----------
Subject: pxa2xx_spi: prevent panic case setup() fails
Date: Friday 08 May 2009
From: Daniel Ribeiro <[email protected]>
To: Eric Miao <[email protected]>
setup() may fail before ctldata is set, causing a kernel panic on cleanup().
Signed-off-by Daniel Ribeiro <[email protected]>
Signed-off-by David Brownell <[email protected]>
drivers/spi/pxa2xx_spi.c +3 -0
@@ -1373,6 +1373,9 @@ static void cleanup(struct spi_device *spi) {struct chip_data *chip =spi_get_ctldata (spi); +if (!chip) +return ; +if (gpio_is_valid (chip->gpio_cs))gpio_free (chip->gpio_cs);
Signature · 11 lines
Daniel Ribeiro ------------------------------------------------------- ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com