aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-12-29 19:48:47 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:42 -0500
commitde4fa99266b2e1f6771644b9b50f33fe8f82d728 (patch)
tree1c1afc6745a16504acdf775fae7d9fef3df12bef /drivers/mtd/devices
parent17c65d69906a6e2e6df4822b00a9e5e00e35ea9a (diff)
[PATCH] SPI/MTD: mtd_dataflash oops prevention
Return a fault code if the Dataflash driver runs into a "no device present" error when the MISO line has a pulldown (it currently expects a pullup), so that rmmod won't oops. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 0a7e86859bf1..910e4061dfd2 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -536,7 +536,7 @@ static int __devinit dataflash_probe(struct spi_device *spi)
536 if (status <= 0 || status == 0xff) { 536 if (status <= 0 || status == 0xff) {
537 DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", 537 DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
538 spi->dev.bus_id, status); 538 spi->dev.bus_id, status);
539 if (status == 0xff) 539 if (status == 0 || status == 0xff)
540 status = -ENODEV; 540 status = -ENODEV;
541 return status; 541 return status;
542 } 542 }