Messages in this thread Patch in this message | | | From | Jiasheng Jiang <> | Subject | [PATCH] net: ks8851: Fix wrong check for irq | Date | Fri, 24 Dec 2021 13:17:53 +0800 |
| |
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
| |