diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-06 23:36:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:34 -0500 |
commit | 8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 (patch) | |
tree | f68a69c5b841ace15ae19b8e9da21b9ffca726b2 /drivers/block/paride/pcd.c | |
parent | 138ae6631a3d6f86851dd53686fa88295d1398bd (diff) |
[PATCH] paride: return proper error code
This patch makes module init return proper value instead of -1 (-EPERM).
Cc: Tim Waugh <tim@cyberelk.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/paride/pcd.c')
-rw-r--r-- | drivers/block/paride/pcd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index ac5ba462710b..c852eed91e4b 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -912,12 +912,12 @@ static int __init pcd_init(void) | |||
912 | int unit; | 912 | int unit; |
913 | 913 | ||
914 | if (disable) | 914 | if (disable) |
915 | return -1; | 915 | return -EINVAL; |
916 | 916 | ||
917 | pcd_init_units(); | 917 | pcd_init_units(); |
918 | 918 | ||
919 | if (pcd_detect()) | 919 | if (pcd_detect()) |
920 | return -1; | 920 | return -ENODEV; |
921 | 921 | ||
922 | /* get the atapi capabilities page */ | 922 | /* get the atapi capabilities page */ |
923 | pcd_probe_capabilities(); | 923 | pcd_probe_capabilities(); |
@@ -925,7 +925,7 @@ static int __init pcd_init(void) | |||
925 | if (register_blkdev(major, name)) { | 925 | if (register_blkdev(major, name)) { |
926 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) | 926 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) |
927 | put_disk(cd->disk); | 927 | put_disk(cd->disk); |
928 | return -1; | 928 | return -EBUSY; |
929 | } | 929 | } |
930 | 930 | ||
931 | pcd_queue = blk_init_queue(do_pcd_request, &pcd_lock); | 931 | pcd_queue = blk_init_queue(do_pcd_request, &pcd_lock); |
@@ -933,7 +933,7 @@ static int __init pcd_init(void) | |||
933 | unregister_blkdev(major, name); | 933 | unregister_blkdev(major, name); |
934 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) | 934 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) |
935 | put_disk(cd->disk); | 935 | put_disk(cd->disk); |
936 | return -1; | 936 | return -ENOMEM; |
937 | } | 937 | } |
938 | 938 | ||
939 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) { | 939 | for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) { |