Skip to content

Commit ac97a35

Browse files
YueHaibingdavem330
authored andcommitted
net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe, The proper pointer to use is clk instead of mode. This issue was detected with the help of Coccinelle. Fixes: 83a8471 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5b27aaf commit ac97a35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ti/cpsw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
23812381

23822382
clk = devm_clk_get(dev, "fck");
23832383
if (IS_ERR(clk)) {
2384-
ret = PTR_ERR(mode);
2384+
ret = PTR_ERR(clk);
23852385
dev_err(dev, "fck is not found %d\n", ret);
23862386
return ret;
23872387
}

0 commit comments

Comments
 (0)