staging: lustre: llite: Compare of unsigned value against 0 is always true
authorDmitry Eremin <dmitry.eremin@intel.com>
Sun, 18 Sep 2016 20:37:24 +0000 (16:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Sep 2016 07:37:46 +0000 (09:37 +0200)
Comparison of unsigned value against 0 is always true.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5200
Reviewed-on: http://review.whamcloud.com/11217
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/lproc_llite.c

index af233eac1a608997aae1f712be13391b2313619b..fc2ba56266b30bf38c409ef6d4eccfb0e8b7588a 100644 (file)
@@ -846,7 +846,7 @@ static ssize_t unstable_stats_store(struct kobject *kobj,
 
        if (!count)
                return 0;
-       if (count < 0 || count >= sizeof(kernbuf))
+       if (count >= sizeof(kernbuf))
                return -EINVAL;
 
        if (copy_from_user(kernbuf, buffer, count))