Skip to content

Commit

Permalink
bnx2x: Handling probe failures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Jan 20, 2009
1 parent 70b9986 commit 693fc0d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10269,17 +10269,15 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
return rc;
}

rc = register_netdev(dev);
if (rc) {
dev_err(&pdev->dev, "Cannot register net device\n");
goto init_one_exit;
}

pci_set_drvdata(pdev, dev);

rc = bnx2x_init_bp(bp);
if (rc)
goto init_one_exit;

rc = register_netdev(dev);
if (rc) {
unregister_netdev(dev);
dev_err(&pdev->dev, "Cannot register net device\n");
goto init_one_exit;
}

Expand Down

0 comments on commit 693fc0d

Please sign in to comment.