Skip to content

Commit

Permalink
m68k: Return -ENODEV if no device is found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Jul 21, 2008
1 parent 038eddd commit e945b56
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/block/ataflop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/atakbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/atafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e945b56

Please sign in to comment.