Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de4fa99266b2e1f6771644b9b50f33fe8f82d728
Commit:     de4fa99266b2e1f6771644b9b50f33fe8f82d728
Parent:     17c65d69906a6e2e6df4822b00a9e5e00e35ea9a
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 16:48:47 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 10:56:42 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/mtd/devices/mtd_dataflash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/devices/mtd_dataflash.c 
b/drivers/mtd/devices/mtd_dataflash.c
index 0a7e868..910e406 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)
        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;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to