提交 2c006994 编写于 作者: W Wei Yongjun 提交者: David S. Miller

bfin_mac: fix error return code in bfin_mac_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 155d940a
...@@ -1700,7 +1700,8 @@ static int bfin_mac_probe(struct platform_device *pdev) ...@@ -1700,7 +1700,8 @@ static int bfin_mac_probe(struct platform_device *pdev)
} }
bfin_mac_hwtstamp_init(ndev); bfin_mac_hwtstamp_init(ndev);
if (bfin_phc_init(ndev, &pdev->dev)) { rc = bfin_phc_init(ndev, &pdev->dev);
if (rc) {
dev_err(&pdev->dev, "Cannot register PHC device!\n"); dev_err(&pdev->dev, "Cannot register PHC device!\n");
goto out_err_phc; goto out_err_phc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册