projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
379ebf0
)
sunrpc: kstrtoul() can also return -ERANGE
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 12 Jul 2018 12:30:08 +0000
(15:30 +0300)
committer
Anna Schumaker
<Anna.Schumaker@Netapp.com>
Tue, 31 Jul 2018 16:53:40 +0000
(12:53 -0400)
Smatch complains that "num" can be uninitialized when kstrtoul() returns
-ERANGE. It's true enough, but basically harmless in this case.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/auth.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/auth.c
b/net/sunrpc/auth.c
index
661e227
..
305ecea
100644
(file)
--- a/
net/sunrpc/auth.c
+++ b/
net/sunrpc/auth.c
@@
-50,7
+50,7
@@
static int param_set_hashtbl_sz(const char *val, const struct kernel_param *kp)
if (!val)
goto out_inval;
ret = kstrtoul(val, 0, &num);
- if (ret
== -EINVAL
)
+ if (ret)
goto out_inval;
nbits = fls(num - 1);
if (nbits > MAX_HASHTABLE_BITS || nbits < 2)