Commit cd1560e2 authored by Rajesh Borundia's avatar Rajesh Borundia Committed by David S. Miller

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: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf63014f
...@@ -2323,14 +2323,14 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev, ...@@ -2323,14 +2323,14 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev,
if (err) if (err)
return err; return err;
qlcnic_dcb_init_dcbnl_ops(adapter->dcb);
err = register_netdev(netdev); err = register_netdev(netdev);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to register net device\n"); dev_err(&pdev->dev, "failed to register net device\n");
return err; return err;
} }
qlcnic_dcb_init_dcbnl_ops(adapter->dcb);
return 0; return 0;
} }
......
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