lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211224051753.1565175-1-jiasheng@iscas.ac.cn>
Date:   Fri, 24 Dec 2021 13:17:53 +0800
From:   Jiasheng Jiang <jiasheng@...as.ac.cn>
To:     davem@...emloft.net, kuba@...nel.org,
        u.kleine-koenig@...gutronix.de, marex@...x.de, trix@...hat.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] net: ks8851: Fix wrong check for irq

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@...as.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ