Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

YueHaibing and committed by
David S. Miller
ac97a359 5b27aafa

+1 -1
+1 -1
drivers/net/ethernet/ti/cpsw.c
··· 2381 2381 2382 2382 clk = devm_clk_get(dev, "fck"); 2383 2383 if (IS_ERR(clk)) { 2384 - ret = PTR_ERR(mode); 2384 + ret = PTR_ERR(clk); 2385 2385 dev_err(dev, "fck is not found %d\n", ret); 2386 2386 return ret; 2387 2387 }