From: Dmitry Eremin Date: Sun, 18 Sep 2016 20:37:24 +0000 (-0400) Subject: staging: lustre: llite: Compare of unsigned value against 0 is always true X-Git-Tag: v4.9.8~1233^2~478 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d38a48e5b8cf0a186789c0b80a5e771672e141ea;p=platform%2Fkernel%2Flinux-rpi3.git staging: lustre: llite: Compare of unsigned value against 0 is always true Comparison of unsigned value against 0 is always true. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5200 Reviewed-on: http://review.whamcloud.com/11217 Reviewed-by: John L. Hammond Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index af233ea..fc2ba56 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -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))