From: YueHaibing Date: Tue, 30 Apr 2019 01:55:24 +0000 (+0000) Subject: net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() X-Git-Tag: v5.15~6431^2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac97a359b72d340e1c04083451b1c6d2f41eb317;p=platform%2Fkernel%2Flinux-starfive.git 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: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index c3cba46..e376806 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev) clk = devm_clk_get(dev, "fck"); if (IS_ERR(clk)) { - ret = PTR_ERR(mode); + ret = PTR_ERR(clk); dev_err(dev, "fck is not found %d\n", ret); return ret; }