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> Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
committed by
Adrian Bunk
parent
30f1962cb4
commit
7f415f1af0
@@ -536,7 +536,7 @@ static int __devinit dataflash_probe(struct spi_device *spi)
|
||||
if (status <= 0 || status == 0xff) {
|
||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
|
||||
spi->dev.bus_id, status);
|
||||
if (status == 0xff)
|
||||
if (status == 0 || status == 0xff)
|
||||
status = -ENODEV;
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user