mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
This commit is contained in:
parent
379ebf0796
commit
1a54c0cfcb
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue