Commit 8ebfe281 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Ben Hutchings

ixgbe: fix registration order of driver and DCA nofitication

commit f01fc1a8 upstream.

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.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: no debugfs support]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent b8e35885
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment