]> err.no Git - linux-2.6/commitdiff
pata_winbond: error return
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Sat, 19 Jan 2008 15:53:55 +0000 (15:53 +0000)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:17 +0000 (05:24 -0500)
If no device is active return an error not zero.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/pata_winbond.c

index 17a9d07132323dbd600bd77e559cf62384ea372e..99c92eda217b730c12994c24422debddcd14154f 100644 (file)
@@ -195,7 +195,7 @@ static __init int winbond_init_one(unsigned long port)
        reg = winbond_readcfg(port, 0x81);
 
        if (!(reg & 0x03))              /* Disabled */
-               return 0;
+               return -ENODEV;
 
        for (i = 0; i < 2 ; i ++) {
                unsigned long cmd_port = 0x1F0 - (0x80 * i);