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>
This commit is contained in:
Rajesh Borundia 2014-08-04 11:51:18 -04:00 committed by David S. Miller
parent bf63014f10
commit cd1560e2b6
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}