aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@intel.com>2013-04-03 12:50:54 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-05 00:49:13 -0400
commitf01fc1a82c2ee68726b400fadb156bd623b5f2f1 (patch)
treea8a38e688acb792ea5b88114f9092de6d28ff7de /drivers/net/ethernet
parent0e82e7f6dfeec1013339612f74abc2cdd29d43d2 (diff)
ixgbe: fix registration order of driver and DCA nofitication
ixgbe_notify_dca cannot be called before driver registration because it expects driver's klist_devices to be allocated and initialized. While on it make sure debugfs files are removed when registration fails. Cc: stable <stable@vger.kernel.org> Signed-off-by: Jakub Kicinski <jakub.kicinski@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index db5611ae407e..79f4a26ea6cc 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7922,12 +7922,19 @@ static int __init ixgbe_init_module(void)
7922 ixgbe_dbg_init(); 7922 ixgbe_dbg_init();
7923#endif /* CONFIG_DEBUG_FS */ 7923#endif /* CONFIG_DEBUG_FS */
7924 7924
7925 ret = pci_register_driver(&ixgbe_driver);
7926 if (ret) {
7927#ifdef CONFIG_DEBUG_FS
7928 ixgbe_dbg_exit();
7929#endif /* CONFIG_DEBUG_FS */
7930 return ret;
7931 }
7932
7925#ifdef CONFIG_IXGBE_DCA 7933#ifdef CONFIG_IXGBE_DCA
7926 dca_register_notify(&dca_notifier); 7934 dca_register_notify(&dca_notifier);
7927#endif 7935#endif
7928 7936
7929 ret = pci_register_driver(&ixgbe_driver); 7937 return 0;
7930 return ret;
7931} 7938}
7932 7939
7933module_init(ixgbe_init_module); 7940module_init(ixgbe_init_module);