* [PATCH] net: ks8851: Fix wrong check for irq
@ 2021-12-24 5:17 Jiasheng Jiang
2021-12-24 23:01 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2021-12-24 5:17 UTC (permalink / raw)
To: davem, kuba, u.kleine-koenig, marex, trix
Cc: netdev, linux-kernel, Jiasheng Jiang
Because netdev->irq is unsigned, the check is useless.
Therefore, we need to correct the check by using error variable.
Fixes: 99d7fbb5cedf ("net: ks8851: Check for error irq")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
drivers/net/ethernet/micrel/ks8851_par.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851_par.c b/drivers/net/ethernet/micrel/ks8851_par.c
index 7f49042484bd..2f3c67c35b18 100644
--- a/drivers/net/ethernet/micrel/ks8851_par.c
+++ b/drivers/net/ethernet/micrel/ks8851_par.c
@@ -320,9 +320,10 @@ static int ks8851_probe_par(struct platform_device *pdev)
if (ret)
return ret;
- netdev->irq = platform_get_irq(pdev, 0);
- if (netdev->irq < 0)
- return netdev->irq;
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
+ return ret;
+ netdev->irq = ret;
return ks8851_probe_common(netdev, dev, msg_enable);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ks8851: Fix wrong check for irq
2021-12-24 5:17 [PATCH] net: ks8851: Fix wrong check for irq Jiasheng Jiang
@ 2021-12-24 23:01 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-12-24 23:01 UTC (permalink / raw)
To: Jiasheng Jiang; +Cc: davem, u.kleine-koenig, marex, trix, netdev, linux-kernel
On Fri, 24 Dec 2021 13:17:53 +0800 Jiasheng Jiang wrote:
> Because netdev->irq is unsigned
It is not.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-24 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-24 5:17 [PATCH] net: ks8851: Fix wrong check for irq Jiasheng Jiang
2021-12-24 23:01 ` Jakub Kicinski
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.