staging: lustre: ptlrpc: remove unnecessary code
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 11 May 2017 04:27:40 +0000 (23:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 05:41:59 +0000 (07:41 +0200)
offset is an unsigned variable and, greater-than-or-equal-to-zero
comparison of an unsigned variable is always true.

Addresses-Coverity-ID: 1373919
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/layout.c

index 8177e1a..5810bba 100644 (file)
@@ -1761,7 +1761,7 @@ static u32 __req_capsule_offset(const struct req_capsule *pill,
                 field->rmf_name, offset, loc);
        offset--;
 
-       LASSERT(0 <= offset && offset < REQ_MAX_FIELD_NR);
+       LASSERT(offset < REQ_MAX_FIELD_NR);
        return offset;
 }