diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-04 14:54:56 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-04 14:54:56 +0100 |
commit | bb960a1e42042e82447a5bc0941b3ab6d614bac3 (patch) | |
tree | d2295a923fabb1b01b25bb015c4c2e42ee9df5ca /drivers/char/ser_a2232.c | |
parent | 858770619debfb9269add63e4ba8b7c6b5538dd1 (diff) | |
parent | 06fc732c33a7ff5e4c91bcf4a6ca86b5e335ad9a (diff) |
Merge branch 'core/xen' into x86/urgent
Diffstat (limited to 'drivers/char/ser_a2232.c')
-rw-r--r-- | drivers/char/ser_a2232.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c index 33872a219df..33a2b531802 100644 --- a/drivers/char/ser_a2232.c +++ b/drivers/char/ser_a2232.c @@ -718,6 +718,7 @@ static int __init a2232board_init(void) u_char *from; volatile u_char *to; volatile struct a2232memory *mem; + int error, i; #ifdef CONFIG_SMP return -ENODEV; /* This driver is not SMP aware. Is there an SMP ZorroII-bus-machine? */ @@ -797,8 +798,15 @@ static int __init a2232board_init(void) */ if (a2232_init_drivers()) return -ENODEV; // maybe we should use a different -Exxx? - request_irq(IRQ_AMIGA_VERTB, a2232_vbl_inter, 0, "A2232 serial VBL", a2232_driver_ID); - return 0; + error = request_irq(IRQ_AMIGA_VERTB, a2232_vbl_inter, 0, + "A2232 serial VBL", a2232_driver_ID); + if (error) { + for (i = 0; i < nr_a2232; i++) + zorro_release_device(zd_a2232[i]); + tty_unregister_driver(a2232_driver); + put_tty_driver(a2232_driver); + } + return error; } static void __exit a2232board_exit(void) |