staging: lustre: remove invalid check
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 21 Sep 2015 13:33:58 +0000 (15:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 01:57:00 +0000 (03:57 +0200)
Unsigned cannot be negative.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/lproc_osc.c

index c504d1503fda2530ae6dc586712ece997c8d9b3c..f3eb39fe85357602630899f6bf5a5738a87d7640 100644 (file)
@@ -451,9 +451,6 @@ static ssize_t resend_count_store(struct kobject *kobj,
        if (rc)
                return rc;
 
-       if (val < 0)
-              return -EINVAL;
-
        atomic_set(&obd->u.cli.cl_resends, val);
 
        return count;