From 29b4c3ca438a6fd09f49edc7e99236a694b5c931 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 1 Oct 2020 09:43:36 +0200 Subject: net: macb: fix wrong return values on some errors Coccinelle detected that the IS_ERR and ERR_PTR are mismatched. Fix it. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/macb.c') diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 4850e60c49..e3e039f679 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -731,7 +731,7 @@ static int macb_probe(struct device_d *dev) if (hclk_name) { macb->hclk = clk_get(dev, pclk_name); - if (IS_ERR(macb->pclk)) { + if (IS_ERR(macb->hclk)) { dev_err(dev, "no hclk\n"); return PTR_ERR(macb->hclk); } -- cgit v1.2.3