aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/dz.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/dz.c')
-rw-r--r--drivers/serial/dz.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index e1a2e413eb7d..fb6f27302935 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -794,18 +794,28 @@ static int __init dz_init(void)
794 dz_reset(&dz_ports[0]); 794 dz_reset(&dz_ports[0]);
795#endif 795#endif
796 796
797 if (request_irq(dz_ports[0].port.irq, dz_interrupt,
798 IRQF_DISABLED, "DZ", &dz_ports[0]))
799 panic("Unable to register DZ interrupt");
800
801 ret = uart_register_driver(&dz_reg); 797 ret = uart_register_driver(&dz_reg);
802 if (ret != 0) 798 if (ret != 0)
803 return ret; 799 goto out;
800
801 ret = request_irq(dz_ports[0].port.irq, dz_interrupt, IRQF_DISABLED,
802 "DZ", &dz_ports[0]);
803 if (ret != 0) {
804 printk(KERN_ERR "dz: Cannot get IRQ %d!\n",
805 dz_ports[0].port.irq);
806 goto out_unregister;
807 }
804 808
805 for (i = 0; i < DZ_NB_PORT; i++) 809 for (i = 0; i < DZ_NB_PORT; i++)
806 uart_add_one_port(&dz_reg, &dz_ports[i].port); 810 uart_add_one_port(&dz_reg, &dz_ports[i].port);
807 811
808 return ret; 812 return ret;
813
814out_unregister:
815 uart_unregister_driver(&dz_reg);
816
817out:
818 return ret;
809} 819}
810 820
811module_init(dz_init); 821module_init(dz_init);