summaryrefslogtreecommitdiffstats
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-10-01 09:43:36 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-02 06:28:15 +0200
commit29b4c3ca438a6fd09f49edc7e99236a694b5c931 (patch)
tree9d9c002a9d017dcf64eca0409563dabddb27763e /drivers/net/macb.c
parent5d1a657c3ba355f4818129ae2762660aadf8df87 (diff)
downloadbarebox-29b4c3ca438a6fd09f49edc7e99236a694b5c931.tar.gz
barebox-29b4c3ca438a6fd09f49edc7e99236a694b5c931.tar.xz
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 <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r--drivers/net/macb.c2
1 files changed, 1 insertions, 1 deletions
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);
}