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 <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>
This commit is contained in:
Dmitry Eremin
2016-09-18 16:37:24 -04:00
committed by Greg Kroah-Hartman
parent bc3877b08b
commit d38a48e5b8

View 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))