Skip to content

Commit 2c00699

Browse files
Wei Yongjundavem330
authored andcommitted
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 155d940 commit 2c00699

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/adi/bfin_mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,8 @@ static int bfin_mac_probe(struct platform_device *pdev)
17001700
}
17011701

17021702
bfin_mac_hwtstamp_init(ndev);
1703-
if (bfin_phc_init(ndev, &pdev->dev)) {
1703+
rc = bfin_phc_init(ndev, &pdev->dev);
1704+
if (rc) {
17041705
dev_err(&pdev->dev, "Cannot register PHC device!\n");
17051706
goto out_err_phc;
17061707
}

0 commit comments

Comments
 (0)