diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-07 04:36:43 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 16:39:34 (GMT) |
commit | 8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 (patch) | |
tree | f68a69c5b841ace15ae19b8e9da21b9ffca726b2 /drivers/block/paride/pcd.c | |
parent | 138ae6631a3d6f86851dd53686fa88295d1398bd (diff) | |
download | linux-fsl-qoriq-8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6.tar.xz |
[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 ac5ba46..c852eed 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -912,12 +912,12 @@ static int __init pcd_init(void) int unit; if (disable) - return -1; + return -EINVAL; pcd_init_units(); if (pcd_detect()) - return -1; + return -ENODEV; /* get the atapi capabilities page */ pcd_probe_capabilities(); @@ -925,7 +925,7 @@ static int __init pcd_init(void) if (register_blkdev(major, name)) { for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) put_disk(cd->disk); - return -1; + return -EBUSY; } pcd_queue = blk_init_queue(do_pcd_request, &pcd_lock); @@ -933,7 +933,7 @@ static int __init pcd_init(void) unregister_blkdev(major, name); for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) put_disk(cd->disk); - return -1; + return -ENOMEM; } for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) { |