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: <20221216211124.154459-1-tegongkang@gmail.com>
Date:   Sat, 17 Dec 2022 06:11:24 +0900
From:   Kang Minchul <tegongkang@...il.com>
To:     Alex Elder <elder@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kang Minchul <tegongkang@...il.com>
Subject: [PATCH net-next v3] net: ipa: Remove redundant comparison with zero

platform_get_irq_byname() returns non-zero IRQ number on success,
and negative error number on failure.

So comparing return value with zero is unnecessary.

Signed-off-by: Kang Minchul <tegongkang@...il.com>
---
 drivers/net/ipa/gsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index bea2da1c4c51..e05e94bd9ba0 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -1302,7 +1302,7 @@ static int gsi_irq_init(struct gsi *gsi, struct platform_device *pdev)
 	int ret;
 
 	ret = platform_get_irq_byname(pdev, "gsi");
-	if (ret <= 0)
+	if (ret < 0)
 		return ret ? : -EINVAL;
 
 	gsi->irq = ret;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ