dm dust: remove redundant unsigned comparison to less than zero
authorColin Ian King <colin.king@canonical.com>
Wed, 1 May 2019 12:57:17 +0000 (13:57 +0100)
committerMike Snitzer <snitzer@redhat.com>
Tue, 7 May 2019 20:05:06 +0000 (16:05 -0400)
Variable block is an unsigned long long hence the less than zero
comparison is always false, hence it is redundant and can be removed.

Addresses-Coverity: ("Unsigned compared against 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Bryan Gurney <bgurney@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-dust.c

index 178587bdc62683021fd0a99d84b0c248338e7648..e739092bfc65ea2a6b52888341edb16bc98e6a0a 100644 (file)
@@ -411,7 +411,7 @@ static int dust_message(struct dm_target *ti, unsigned int argc, char **argv,
 
                block = tmp;
                sector_div(size, dd->sect_per_block);
-               if (block > size || block < 0) {
+               if (block > size) {
                        DMERR("selected block value out of range");
                        return result;
                }