Skip to contentSkip to conversation

bnx2x: Calling pci_set_drvdata earlier

PATCH In review Eilon Greenstein 1 participant 1 message Aug 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 18/36 bnx2x: Calling pci_set_drvdata earlier

In case of error, bnx2x_init_dev calls pci_set_drvdata(pdev, NULL)

---
 drivers/net/bnx2x_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnx2x_main.c +2 -2
index e9e4349..9eea52d 100644
@@ -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;
Signature · 1 line
1.5.4.3