Skip to content

Commit

Permalink
bfin_mac: fix error return code in bfin_mac_probe()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and davem330 committed May 8, 2013
1 parent 155d940 commit 2c00699
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/adi/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,8 @@ static int bfin_mac_probe(struct platform_device *pdev)
}

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");
goto out_err_phc;
}
Expand Down

0 comments on commit 2c00699

Please sign in to comment.