diff options
author | Shreyas Bhatewara <sbhatewara@vmware.com> | 2011-07-20 16:01:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 20:39:47 -0700 |
commit | e101e7ddad7a16ada030d6d1f044381924bcc0c1 (patch) | |
tree | 5557d53ebcb115ab4ab359de0a027de6659dff14 /drivers/net | |
parent | 308859097831831a979f2e82cbeef0a94f438080 (diff) | |
download | op-kernel-dev-e101e7ddad7a16ada030d6d1f044381924bcc0c1.zip op-kernel-dev-e101e7ddad7a16ada030d6d1f044381924bcc0c1.tar.gz |
vmxnet3: set netdev parant device before calling netdev_info
Parent device for netdev should be set before netdev_info() can be called
otherwise there is a NULL pointer dereference and probe() fails.
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>--
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 009277e..1a8cc5b 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2993,6 +2993,7 @@ vmxnet3_probe_device(struct pci_dev *pdev, goto err_ver; } + SET_NETDEV_DEV(netdev, &pdev->dev); vmxnet3_declare_features(adapter, dma64); adapter->dev_number = atomic_read(&devices_found); @@ -3038,7 +3039,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); netif_set_real_num_rx_queues(adapter->netdev, adapter->num_rx_queues); - SET_NETDEV_DEV(netdev, &pdev->dev); err = register_netdev(netdev); if (err) { |