Commit ac97a359 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

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: 83a8471b ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b27aafa
...@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev) ...@@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev)
clk = devm_clk_get(dev, "fck"); clk = devm_clk_get(dev, "fck");
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
ret = PTR_ERR(mode); ret = PTR_ERR(clk);
dev_err(dev, "fck is not found %d\n", ret); dev_err(dev, "fck is not found %d\n", ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment