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:
parent
bf63014f10
commit
cd1560e2b6
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue