diff options
-rw-r--r-- | drivers/block/paride/aten.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/bpck.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/bpck6.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/comm.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/dstr.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/epat.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/epia.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/fit2.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/fit3.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/friq.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/frpw.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/kbic.c | 10 | ||||
-rw-r--r-- | drivers/block/paride/ktti.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/on20.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/on26.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/paride.c | 6 |
16 files changed, 26 insertions, 18 deletions
diff --git a/drivers/block/paride/aten.c b/drivers/block/paride/aten.c index 3539099a7fa..2695465568a 100644 --- a/drivers/block/paride/aten.c +++ b/drivers/block/paride/aten.c @@ -149,7 +149,7 @@ static struct pi_protocol aten = { static int __init aten_init(void) { - return paride_register(&aten)-1; + return paride_register(&aten); } static void __exit aten_exit(void) diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c index b0df16dfd19..4f27e7392e3 100644 --- a/drivers/block/paride/bpck.c +++ b/drivers/block/paride/bpck.c @@ -464,7 +464,7 @@ static struct pi_protocol bpck = { static int __init bpck_init(void) { - return paride_register(&bpck)-1; + return paride_register(&bpck); } static void __exit bpck_exit(void) diff --git a/drivers/block/paride/bpck6.c b/drivers/block/paride/bpck6.c index 7c04f74f9d7..da6b5d27bad 100644 --- a/drivers/block/paride/bpck6.c +++ b/drivers/block/paride/bpck6.c @@ -265,7 +265,7 @@ static int __init bpck6_init(void) printk(KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n"); if(verbose) printk(KERN_DEBUG "bpck6: verbose debug enabled.\n"); - return paride_register(&bpck6) - 1; + return paride_register(&bpck6); } static void __exit bpck6_exit(void) diff --git a/drivers/block/paride/comm.c b/drivers/block/paride/comm.c index c3d4076e8c0..9bcd3549532 100644 --- a/drivers/block/paride/comm.c +++ b/drivers/block/paride/comm.c @@ -205,7 +205,7 @@ static struct pi_protocol comm = { static int __init comm_init(void) { - return paride_register(&comm)-1; + return paride_register(&comm); } static void __exit comm_exit(void) diff --git a/drivers/block/paride/dstr.c b/drivers/block/paride/dstr.c index 2e4219eac52..accc5c777cb 100644 --- a/drivers/block/paride/dstr.c +++ b/drivers/block/paride/dstr.c @@ -220,7 +220,7 @@ static struct pi_protocol dstr = { static int __init dstr_init(void) { - return paride_register(&dstr)-1; + return paride_register(&dstr); } static void __exit dstr_exit(void) diff --git a/drivers/block/paride/epat.c b/drivers/block/paride/epat.c index 5ed4fc1a00b..1bcdff77322 100644 --- a/drivers/block/paride/epat.c +++ b/drivers/block/paride/epat.c @@ -327,7 +327,7 @@ static int __init epat_init(void) #ifdef CONFIG_PARIDE_EPATC8 epatc8 = 1; #endif - return paride_register(&epat)-1; + return paride_register(&epat); } static void __exit epat_exit(void) diff --git a/drivers/block/paride/epia.c b/drivers/block/paride/epia.c index 649766c1490..fb0e782d055 100644 --- a/drivers/block/paride/epia.c +++ b/drivers/block/paride/epia.c @@ -303,7 +303,7 @@ static struct pi_protocol epia = { static int __init epia_init(void) { - return paride_register(&epia)-1; + return paride_register(&epia); } static void __exit epia_exit(void) diff --git a/drivers/block/paride/fit2.c b/drivers/block/paride/fit2.c index 7a162496703..381283753ae 100644 --- a/drivers/block/paride/fit2.c +++ b/drivers/block/paride/fit2.c @@ -138,7 +138,7 @@ static struct pi_protocol fit2 = { static int __init fit2_init(void) { - return paride_register(&fit2)-1; + return paride_register(&fit2); } static void __exit fit2_exit(void) diff --git a/drivers/block/paride/fit3.c b/drivers/block/paride/fit3.c index c701577d15a..275d269458e 100644 --- a/drivers/block/paride/fit3.c +++ b/drivers/block/paride/fit3.c @@ -198,7 +198,7 @@ static struct pi_protocol fit3 = { static int __init fit3_init(void) { - return paride_register(&fit3)-1; + return paride_register(&fit3); } static void __exit fit3_exit(void) diff --git a/drivers/block/paride/friq.c b/drivers/block/paride/friq.c index e9edfa2e3a6..4f2ba244689 100644 --- a/drivers/block/paride/friq.c +++ b/drivers/block/paride/friq.c @@ -263,7 +263,7 @@ static struct pi_protocol friq = { static int __init friq_init(void) { - return paride_register(&friq)-1; + return paride_register(&friq); } static void __exit friq_exit(void) diff --git a/drivers/block/paride/frpw.c b/drivers/block/paride/frpw.c index 407f821d240..c3cde364603 100644 --- a/drivers/block/paride/frpw.c +++ b/drivers/block/paride/frpw.c @@ -300,7 +300,7 @@ static struct pi_protocol frpw = { static int __init frpw_init(void) { - return paride_register(&frpw)-1; + return paride_register(&frpw); } static void __exit frpw_exit(void) diff --git a/drivers/block/paride/kbic.c b/drivers/block/paride/kbic.c index a5632819027..35999c415ee 100644 --- a/drivers/block/paride/kbic.c +++ b/drivers/block/paride/kbic.c @@ -283,7 +283,15 @@ static struct pi_protocol k971 = { static int __init kbic_init(void) { - return (paride_register(&k951)||paride_register(&k971))-1; + int rv; + + rv = paride_register(&k951); + if (rv < 0) + return rv; + rv = paride_register(&k971); + if (rv < 0) + paride_unregister(&k951); + return rv; } static void __exit kbic_exit(void) diff --git a/drivers/block/paride/ktti.c b/drivers/block/paride/ktti.c index a9d85be0203..117ab0e8ccf 100644 --- a/drivers/block/paride/ktti.c +++ b/drivers/block/paride/ktti.c @@ -115,7 +115,7 @@ static struct pi_protocol ktti = { static int __init ktti_init(void) { - return paride_register(&ktti)-1; + return paride_register(&ktti); } static void __exit ktti_exit(void) diff --git a/drivers/block/paride/on20.c b/drivers/block/paride/on20.c index cc7e9f591dd..0173697a1a4 100644 --- a/drivers/block/paride/on20.c +++ b/drivers/block/paride/on20.c @@ -140,7 +140,7 @@ static struct pi_protocol on20 = { static int __init on20_init(void) { - return paride_register(&on20)-1; + return paride_register(&on20); } static void __exit on20_exit(void) diff --git a/drivers/block/paride/on26.c b/drivers/block/paride/on26.c index 8755ce48693..95ba256921f 100644 --- a/drivers/block/paride/on26.c +++ b/drivers/block/paride/on26.c @@ -306,7 +306,7 @@ static struct pi_protocol on26 = { static int __init on26_init(void) { - return paride_register(&on26)-1; + return paride_register(&on26); } static void __exit on26_exit(void) diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c index 55cabfb60cc..e4c55e05012 100644 --- a/drivers/block/paride/paride.c +++ b/drivers/block/paride/paride.c @@ -237,19 +237,19 @@ int paride_register(PIP * pr) if (protocols[k] && !strcmp(pr->name, protocols[k]->name)) { printk("paride: %s protocol already registered\n", pr->name); - return 0; + return -1; } k = 0; while ((k < MAX_PROTOS) && (protocols[k])) k++; if (k == MAX_PROTOS) { printk("paride: protocol table full\n"); - return 0; + return -1; } protocols[k] = pr; pr->index = k; printk("paride: %s registered as protocol %d\n", pr->name, k); - return 1; + return 0; } EXPORT_SYMBOL(paride_register); |