aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-01-14 01:43:52 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-19 19:20:08 -0500
commit693fc0d14334859430733ab902adac182fdd8153 (patch)
tree8e7603e50079fca08d3e27c4dfdbe2595dedafea /drivers/net/bnx2x_main.c
parent70b9986ca4baaf6deb6f0e01d50f72457579adea (diff)
bnx2x: Handling probe failures
Failures in the probe not handled correctly - separate the flow to handle different failures 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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ce98ecf8cb1c..911067586a4a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -10269,17 +10269,15 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
10269 return rc; 10269 return rc;
10270 } 10270 }
10271 10271
10272 rc = register_netdev(dev);
10273 if (rc) {
10274 dev_err(&pdev->dev, "Cannot register net device\n");
10275 goto init_one_exit;
10276 }
10277
10278 pci_set_drvdata(pdev, dev); 10272 pci_set_drvdata(pdev, dev);
10279 10273
10280 rc = bnx2x_init_bp(bp); 10274 rc = bnx2x_init_bp(bp);
10275 if (rc)
10276 goto init_one_exit;
10277
10278 rc = register_netdev(dev);
10281 if (rc) { 10279 if (rc) {
10282 unregister_netdev(dev); 10280 dev_err(&pdev->dev, "Cannot register net device\n");
10283 goto init_one_exit; 10281 goto init_one_exit;
10284 } 10282 }
10285 10283