Commit fd5b462f0b3ae641e39966d1c6cd0dd66100cda5
Committed by
Linus Torvalds
1 parent
eb98630ba0
Exists in
master
and in
4 other branches
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
drivers/input/serio/q40kbd.c
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; |