diff options
Diffstat (limited to 'drivers/char')
-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 33872a219df6..33a2b531802e 100644 --- a/drivers/char/ser_a2232.c +++ b/drivers/char/ser_a2232.c | |||
@@ -718,6 +718,7 @@ static int __init a2232board_init(void) | |||
718 | u_char *from; | 718 | u_char *from; |
719 | volatile u_char *to; | 719 | volatile u_char *to; |
720 | volatile struct a2232memory *mem; | 720 | volatile struct a2232memory *mem; |
721 | int error, i; | ||
721 | 722 | ||
722 | #ifdef CONFIG_SMP | 723 | #ifdef CONFIG_SMP |
723 | return -ENODEV; /* This driver is not SMP aware. Is there an SMP ZorroII-bus-machine? */ | 724 | 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) | |||
797 | */ | 798 | */ |
798 | if (a2232_init_drivers()) return -ENODEV; // maybe we should use a different -Exxx? | 799 | if (a2232_init_drivers()) return -ENODEV; // maybe we should use a different -Exxx? |
799 | 800 | ||
800 | request_irq(IRQ_AMIGA_VERTB, a2232_vbl_inter, 0, "A2232 serial VBL", a2232_driver_ID); | 801 | error = request_irq(IRQ_AMIGA_VERTB, a2232_vbl_inter, 0, |
801 | return 0; | 802 | "A2232 serial VBL", a2232_driver_ID); |
803 | if (error) { | ||
804 | for (i = 0; i < nr_a2232; i++) | ||
805 | zorro_release_device(zd_a2232[i]); | ||
806 | tty_unregister_driver(a2232_driver); | ||
807 | put_tty_driver(a2232_driver); | ||
808 | } | ||
809 | return error; | ||
802 | } | 810 | } |
803 | 811 | ||
804 | static void __exit a2232board_exit(void) | 812 | static void __exit a2232board_exit(void) |