projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
staging/lustre/libcfs: Fix kstrtouint return value check fix
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
staging
/
lustre
/
lustre
/
libcfs
/
debug.c
diff --git
a/drivers/staging/lustre/lustre/libcfs/debug.c
b/drivers/staging/lustre/lustre/libcfs/debug.c
index 63468870f230f60f39e381726d70fed077c2c6f0..e93f556fac0dde68da054320fc320815c1025258 100644
(file)
--- a/
drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/
drivers/staging/lustre/lustre/libcfs/debug.c
@@
-185,7
+185,7
@@
static int param_set_uint_minmax(const char *val,
if (!val)
return -EINVAL;
ret = kstrtouint(val, 0, &num);
- if (ret
== -EINVAL
|| num < min || num > max)
+ if (ret
< 0
|| num < min || num > max)
return -EINVAL;
*((unsigned int *)kp->arg) = num;
return 0;