From 8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 6 Dec 2006 20:36:43 -0800 Subject: [PATCH] paride: return proper error code This patch makes module init return proper value instead of -1 (-EPERM). Cc: Tim Waugh Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/paride/pf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/block/paride/pf.c') diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 1a9dee19efc..7cdaa195126 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -933,25 +933,25 @@ static int __init pf_init(void) int unit; if (disable) - return -1; + return -EINVAL; pf_init_units(); if (pf_detect()) - return -1; + return -ENODEV; pf_busy = 0; if (register_blkdev(major, name)) { for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) put_disk(pf->disk); - return -1; + return -EBUSY; } pf_queue = blk_init_queue(do_pf_request, &pf_spin_lock); if (!pf_queue) { unregister_blkdev(major, name); for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) put_disk(pf->disk); - return -1; + return -ENOMEM; } blk_queue_max_phys_segments(pf_queue, cluster); -- cgit v1.2.3