summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-07-12 14:30:08 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-07-31 18:53:40 +0200
commit1a54c0cfcbb2d93b6c057b633984f0fd8b882555 (patch)
tree1a2310c00fe0f26b0d5f5cf09bc7af0b3e338d09 /net/sunrpc/auth.c
parentNFS: silence a harmless uninitialized variable warning (diff)
downloadlinux-1a54c0cfcbb2d93b6c057b633984f0fd8b882555.tar.xz
linux-1a54c0cfcbb2d93b6c057b633984f0fd8b882555.zip
sunrpc: kstrtoul() can also return -ERANGE
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>
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r--net/sunrpc/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 661e2277f468..305ecea92170 100644
--- 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)