[PATCH 4/5] net: macb: fix wrong return values on some errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Coccinelle detected that the IS_ERR and ERR_PTR are mismatched.
Fix it.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 4850e60c49ab..e3e039f67988 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);
 		}
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux