m68k: Return -ENODEV if no device is found
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 17 Jul 2008 19:16:10 +0000 (21:16 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 Jul 2008 00:24:38 +0000 (17:24 -0700)
According to the tests in do_initcalls(), the proper error code in case no
device is found is -ENODEV, not -ENXIO or -EIO.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/ataflop.c
drivers/char/nvram.c
drivers/input/keyboard/atakbd.c
drivers/video/atafb.c

index 424995073c6b23941fa123b50888b41fcab2148b..49f274197b16a7ece82403a4118dc26c2d38b514 100644 (file)
@@ -1880,11 +1880,11 @@ static int __init atari_floppy_init (void)
 
        if (!MACH_IS_ATARI)
                /* Amiga, Mac, ... don't have Atari-compatible floppy :-) */
-               return -ENXIO;
+               return -ENODEV;
 
        if (MACH_IS_HADES)
                /* Hades doesn't have Atari-compatible floppy */
-               return -ENXIO;
+               return -ENODEV;
 
        if (register_blkdev(FLOPPY_MAJOR,"fd"))
                return -EBUSY;
index 197cd7a0c33267d9f1becd4b61b8724ac728e804..a22662b6a1a50fc6aa25f7a000d619abd7ba1bc7 100644 (file)
@@ -444,7 +444,7 @@ nvram_init(void)
 
        /* First test whether the driver should init at all */
        if (!CHECK_DRIVER_INIT())
-               return -ENXIO;
+               return -ENODEV;
 
        ret = misc_register(&nvram_dev);
        if (ret) {
index 4e92100c56a8dddcc342c40c5c2867e46e6c0fcf..1839194ea98787ff9fb82f810c18fb4a8bdb893d 100644 (file)
@@ -220,7 +220,7 @@ static int __init atakbd_init(void)
        int i, error;
 
        if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
-               return -EIO;
+               return -ENODEV;
 
        // need to init core driver if not already done so
        if (atari_keyb_init())
index dff35474b854f5b3949d730e8cafc7241792a01f..c8605730a1b0acda1d16de23fcee86fdc4809706 100644 (file)
@@ -3110,7 +3110,7 @@ int __init atafb_init(void)
        printk("atafb_init: start\n");
 
        if (!MACH_IS_ATARI)
-               return -ENXIO;
+               return -ENODEV;
 
        do {
 #ifdef ATAFB_EXT