All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()
  2019-04-29 13:56   ` Andrew Lunn
  (?)
@ 2019-04-29 13:56 ` YueHaibing
  -1 siblings, 0 replies; 19+ messages in thread
From: YueHaibing @ 2019-04-29 13:56 UTC (permalink / raw)
  To: Grygorii Strashko, Ivan Khoronzhuk, Andrew Lunn, Ilias Apalodimas
  Cc: YueHaibing, linux-omap, netdev, kernel-janitors

Change the call to PTR_ERR to access the value just tested by IS_ERR.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}






^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-05-01 18:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 13:56 [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() YueHaibing
2019-04-29 13:56 ` YueHaibing
2019-04-29 13:56 ` YueHaibing
2019-04-29 13:56 ` Andrew Lunn
2019-04-29 13:56   ` Andrew Lunn
2019-04-29 14:17   ` YueHaibing
2019-04-29 14:17     ` YueHaibing
2019-04-29 14:17     ` YueHaibing
2019-04-29 14:31 ` [PATCH v2 " YueHaibing
2019-04-29 14:31   ` YueHaibing
2019-04-29 16:30   ` Julia Lawall
2019-04-29 16:30     ` Julia Lawall
2019-04-30  1:33     ` YueHaibing
2019-04-30  1:33       ` YueHaibing
2019-04-30  1:33       ` YueHaibing
2019-04-30  1:55   ` [PATCH v3 " YueHaibing
2019-04-30  1:55     ` YueHaibing
2019-05-01 18:29     ` David Miller
2019-05-01 18:29       ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.