summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic
diff options
context:
space:
mode:
authorRajesh Borundia <rajesh.borundia@qlogic.com>2014-08-04 11:51:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-05 16:23:27 -0700
commitcd1560e2b60fc2fbfadb9200c366eb59fe04f10d (patch)
treeb98ac38ecf9bfd73f1af2d8901daf8e23f931342 /drivers/net/ethernet/qlogic
parentbf63014f108aaff49e4382b7adc7d0a2b6365744 (diff)
downloadtalos-obmc-linux-cd1560e2b60fc2fbfadb9200c366eb59fe04f10d.tar.gz
talos-obmc-linux-cd1560e2b60fc2fbfadb9200c366eb59fe04f10d.zip
qlcnic: Initialize dcbnl_ops before register_netdev
o Initialization of dcbnl_ops after register netdev may result in dcbnl_ops not getting set before it is being accessed from open. So, moving it before register_netdev. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 158e1d9f255f..3187bc0c471b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2323,14 +2323,14 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev,
if (err)
return err;
+ qlcnic_dcb_init_dcbnl_ops(adapter->dcb);
+
err = register_netdev(netdev);
if (err) {
dev_err(&pdev->dev, "failed to register net device\n");
return err;
}
- qlcnic_dcb_init_dcbnl_ops(adapter->dcb);
-
return 0;
}
OpenPOWER on IntegriCloud