Commit fd5b462f0b3ae641e39966d1c6cd0dd66100cda5

Authored by Geert Uytterhoeven
Committed by Linus Torvalds
1 parent eb98630ba0

m68k: Return -ENODEV if no device is found

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>

Showing 5 changed files with 8 additions and 8 deletions Side-by-side Diff

drivers/block/amiflop.c
... ... @@ -1714,10 +1714,10 @@
1714 1714 int i, ret;
1715 1715  
1716 1716 if (!MACH_IS_AMIGA)
1717   - return -ENXIO;
  1717 + return -ENODEV;
1718 1718  
1719 1719 if (!AMIGAHW_PRESENT(AMI_FLOPPY))
1720   - return -ENXIO;
  1720 + return -ENODEV;
1721 1721  
1722 1722 if (register_blkdev(FLOPPY_MAJOR,"fd"))
1723 1723 return -EBUSY;
... ... @@ -1755,7 +1755,7 @@
1755 1755 if (!floppy_queue)
1756 1756 goto out_queue;
1757 1757  
1758   - ret = -ENXIO;
  1758 + ret = -ENODEV;
1759 1759 if (fd_probe_drives() < 1) /* No usable drives */
1760 1760 goto out_probe;
1761 1761  
drivers/block/z2ram.c
... ... @@ -332,7 +332,7 @@
332 332 int ret;
333 333  
334 334 if (!MACH_IS_AMIGA)
335   - return -ENXIO;
  335 + return -ENODEV;
336 336  
337 337 ret = -EBUSY;
338 338 if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME))
drivers/input/serio/q40kbd.c
... ... @@ -156,7 +156,7 @@
156 156 int error;
157 157  
158 158 if (!MACH_IS_Q40)
159   - return -EIO;
  159 + return -ENODEV;
160 160  
161 161 error = platform_driver_register(&q40kbd_driver);
162 162 if (error)
drivers/video/amifb.c
... ... @@ -2261,7 +2261,7 @@
2261 2261 amifb_setup(option);
2262 2262 #endif
2263 2263 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
2264   - return -ENXIO;
  2264 + return -ENODEV;
2265 2265  
2266 2266 /*
2267 2267 * We request all registers starting from bplpt[0]
... ... @@ -2333,7 +2333,7 @@
2333 2333 strcat(fb_info.fix.id, "Unknown");
2334 2334 goto default_chipset;
2335 2335 #else /* CONFIG_FB_AMIGA_OCS */
2336   - err = -ENXIO;
  2336 + err = -ENODEV;
2337 2337 goto amifb_error;
2338 2338 #endif /* CONFIG_FB_AMIGA_OCS */
2339 2339 break;
drivers/video/hpfb.c
... ... @@ -382,7 +382,7 @@
382 382 #define INTFBPADDR 0x560000
383 383  
384 384 if (!MACH_IS_HP300)
385   - return -ENXIO;
  385 + return -ENODEV;
386 386  
387 387 if (fb_get_options("hpfb", NULL))
388 388 return -ENODEV;