Skip to contentSkip to conversation

firmware: stratix10-rsu: fix warnings

PATCH New [email protected] 1 participant 1 message Jun 3, 2020 Intel STRATIX10 firmware drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: stratix10-rsu: fix warnings

From: Richard Gong <[email protected]>

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

---
 drivers/firmware/stratix10-rsu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/stratix10-rsu.c +2 -2
index 4379475..469b8f7 100644
@@ -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);
Signature · 1 line
2.7.4