summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-08-12 10:23:28 +0200
committerDavid S. Miller <davem@davemloft.net>2009-08-13 08:02:45 +0200
commitdf4770de03d2eec3f66b0ac4d2248d471a1ccc0b (patch)
tree42165fc7574dc1e05ae6663be31b7891c5ff471f /drivers/net/bnx2x_main.c
parentbnx2x: Configurable pause scheme (diff)
downloadlinux-df4770de03d2eec3f66b0ac4d2248d471a1ccc0b.tar.xz
linux-df4770de03d2eec3f66b0ac4d2248d471a1ccc0b.zip
bnx2x: Calling pci_set_drvdata earlier
In case of error, bnx2x_init_dev calls pci_set_drvdata(pdev, NULL) Signed-off-by: Yitchak Gertner <gertner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 0ebbc7794803..8e77e933ac18 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11885,14 +11885,14 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
bp = netdev_priv(dev);
bp->msglevel = debug;
+ pci_set_drvdata(pdev, dev);
+
rc = bnx2x_init_dev(pdev, dev);
if (rc < 0) {
free_netdev(dev);
return rc;
}
- pci_set_drvdata(pdev, dev);
-
rc = bnx2x_init_bp(bp);
if (rc)
goto init_one_exit;