aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/ioc4_serial.c16
-rw-r--r--drivers/sn/ioc3.c2
2 files changed, 14 insertions, 4 deletions
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 902b067d7e9c..836d9ab4f729 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2913,17 +2913,27 @@ static int __init ioc4_serial_init(void)
2913 printk(KERN_WARNING 2913 printk(KERN_WARNING
2914 "%s: Couldn't register rs232 IOC4 serial driver\n", 2914 "%s: Couldn't register rs232 IOC4 serial driver\n",
2915 __func__); 2915 __func__);
2916 return ret; 2916 goto out;
2917 } 2917 }
2918 if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) { 2918 if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) {
2919 printk(KERN_WARNING 2919 printk(KERN_WARNING
2920 "%s: Couldn't register rs422 IOC4 serial driver\n", 2920 "%s: Couldn't register rs422 IOC4 serial driver\n",
2921 __func__); 2921 __func__);
2922 return ret; 2922 goto out_uart_rs232;
2923 } 2923 }
2924 2924
2925 /* register with IOC4 main module */ 2925 /* register with IOC4 main module */
2926 return ioc4_register_submodule(&ioc4_serial_submodule); 2926 ret = ioc4_register_submodule(&ioc4_serial_submodule);
2927 if (ret)
2928 goto out_uart_rs422;
2929 return 0;
2930
2931out_uart_rs422:
2932 uart_unregister_driver(&ioc4_uart_rs422);
2933out_uart_rs232:
2934 uart_unregister_driver(&ioc4_uart_rs232);
2935out:
2936 return ret;
2927} 2937}
2928 2938
2929static void __exit ioc4_serial_exit(void) 2939static void __exit ioc4_serial_exit(void)
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index 354e9f17e35a..66802a4390cc 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -820,7 +820,7 @@ static int __init ioc3_init(void)
820{ 820{
821 if (ia64_platform_is("sn2")) 821 if (ia64_platform_is("sn2"))
822 return pci_register_driver(&ioc3_driver); 822 return pci_register_driver(&ioc3_driver);
823 return 0; 823 return -ENODEV;
824} 824}
825 825
826/* Module unload */ 826/* Module unload */