diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 0fef8c3c553f..0995f90b0bac 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -3451,6 +3451,7 @@ static struct pci_driver qlcnic_driver = { | |||
3451 | 3451 | ||
3452 | static int __init qlcnic_init_module(void) | 3452 | static int __init qlcnic_init_module(void) |
3453 | { | 3453 | { |
3454 | int ret; | ||
3454 | 3455 | ||
3455 | printk(KERN_INFO "%s\n", qlcnic_driver_string); | 3456 | printk(KERN_INFO "%s\n", qlcnic_driver_string); |
3456 | 3457 | ||
@@ -3459,8 +3460,15 @@ static int __init qlcnic_init_module(void) | |||
3459 | register_inetaddr_notifier(&qlcnic_inetaddr_cb); | 3460 | register_inetaddr_notifier(&qlcnic_inetaddr_cb); |
3460 | #endif | 3461 | #endif |
3461 | 3462 | ||
3463 | ret = pci_register_driver(&qlcnic_driver); | ||
3464 | if (ret) { | ||
3465 | #ifdef CONFIG_INET | ||
3466 | unregister_inetaddr_notifier(&qlcnic_inetaddr_cb); | ||
3467 | unregister_netdevice_notifier(&qlcnic_netdev_cb); | ||
3468 | #endif | ||
3469 | } | ||
3462 | 3470 | ||
3463 | return pci_register_driver(&qlcnic_driver); | 3471 | return ret; |
3464 | } | 3472 | } |
3465 | 3473 | ||
3466 | module_init(qlcnic_init_module); | 3474 | module_init(qlcnic_init_module); |