ixgbe: fix registration order of driver and DCA nofitication
[pandora-kernel.git] / drivers / net / ethernet / intel / ixgbe / ixgbe_main.c
index cc96a5a..41396fa 100644 (file)
@@ -8003,12 +8003,15 @@ static int __init ixgbe_init_module(void)
        pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version);
        pr_info("%s\n", ixgbe_copyright);
 
+       ret = pci_register_driver(&ixgbe_driver);
+       if (ret)
+               return ret;
+
 #ifdef CONFIG_IXGBE_DCA
        dca_register_notify(&dca_notifier);
 #endif
 
-       ret = pci_register_driver(&ixgbe_driver);
-       return ret;
+       return 0;
 }
 
 module_init(ixgbe_init_module);