提交 693fc0d1 编写于 作者: E Eilon Greenstein 提交者: David S. Miller

bnx2x: Handling probe failures

Failures in the probe not handled correctly - separate the flow to handle

different failures
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 70b9986c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册