aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/paride/kbic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/paride/kbic.c')
-rw-r--r--drivers/block/paride/kbic.c10
1 files changed, 9 insertions, 1 deletions
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)