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>] [day] [month] [year] [list]
Date:   Wed,  3 Jun 2020 09:06:52 -0500
From:   richard.gong@...ux.intel.com
To:     gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org, richard.gong@...ux.intel.com,
        Richard Gong <richard.gong@...el.com>
Subject: [PATCHv1] firmware: stratix10-rsu: fix warnings

From: Richard Gong <richard.gong@...el.com>

Patch fixes sparse warnings: using plain integer as NULL pointer. Replaces
equal to with logical not operator.

Reported-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Richard Gong <richard.gong@...el.com>
---
 drivers/firmware/stratix10-rsu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
index 4379475..469b8f7 100644
--- a/drivers/firmware/stratix10-rsu.c
+++ b/drivers/firmware/stratix10-rsu.c
@@ -290,7 +290,7 @@ static ssize_t reboot_image_store(struct device *dev,
 	unsigned long address;
 	int ret;
 
-	if (priv == 0)
+	if (!priv)
 		return -ENODEV;
 
 	ret = kstrtoul(buf, 0, &address);
@@ -315,7 +315,7 @@ static ssize_t notify_store(struct device *dev,
 	unsigned long status;
 	int ret;
 
-	if (priv == 0)
+	if (!priv)
 		return -ENODEV;
 
 	ret = kstrtoul(buf, 0, &status);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ