aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
authorShreyas Bhatewara <sbhatewara@vmware.com>2011-07-20 12:01:11 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 23:39:47 -0400
commite101e7ddad7a16ada030d6d1f044381924bcc0c1 (patch)
tree5557d53ebcb115ab4ab359de0a027de6659dff14 /drivers/net/vmxnet3
parent308859097831831a979f2e82cbeef0a94f438080 (diff)
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/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 009277e1084f..1a8cc5bf06bb 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,
2993 goto err_ver; 2993 goto err_ver;
2994 } 2994 }
2995 2995
2996 SET_NETDEV_DEV(netdev, &pdev->dev);
2996 vmxnet3_declare_features(adapter, dma64); 2997 vmxnet3_declare_features(adapter, dma64);
2997 2998
2998 adapter->dev_number = atomic_read(&devices_found); 2999 adapter->dev_number = atomic_read(&devices_found);
@@ -3038,7 +3039,6 @@ vmxnet3_probe_device(struct pci_dev *pdev,
3038 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); 3039 netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
3039 netif_set_real_num_rx_queues(adapter->netdev, adapter->num_rx_queues); 3040 netif_set_real_num_rx_queues(adapter->netdev, adapter->num_rx_queues);
3040 3041
3041 SET_NETDEV_DEV(netdev, &pdev->dev);
3042 err = register_netdev(netdev); 3042 err = register_netdev(netdev);
3043 3043
3044 if (err) { 3044 if (err) {