lkml.org 
[lkml]   [2020]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCHv1] firmware: stratix10-rsu: fix warnings
Date
From: Richard Gong <richard.gong@intel.com>

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

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Richard Gong <richard.gong@intel.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
\
 
 \ /
  Last update: 2020-06-03 15:52    [W:0.021 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site