aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-04-30 01:55:24 +0000
committerDavid S. Miller <davem@davemloft.net>2019-05-01 14:29:35 -0400
commitac97a359b72d340e1c04083451b1c6d2f41eb317 (patch)
tree3ec76db974b912867e56031f4ec13567d1aff07d /drivers
parentMerge branch 'net-sched-taprio-change-schedules' (diff)
downloadlinux-dev-ac97a359b72d340e1c04083451b1c6d2f41eb317.tar.xz
linux-dev-ac97a359b72d340e1c04083451b1c6d2f41eb317.zip
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 <yuehaibing@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 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;
}