* [net-next 18/36] bnx2x: Calling pci_set_drvdata earlier
@ 2009-08-12 18:23 Eilon Greenstein
0 siblings, 0 replies; only message in thread
From: Eilon Greenstein @ 2009-08-12 18:23 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Yitchak Gertner
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>
---
drivers/net/bnx2x_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index e9e4349..9eea52d 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11884,14 +11884,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;
--
1.5.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-12 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 18:23 [net-next 18/36] bnx2x: Calling pci_set_drvdata earlier Eilon Greenstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox