From: Colin Ian King Date: Wed, 1 May 2019 12:57:17 +0000 (+0100) Subject: dm dust: remove redundant unsigned comparison to less than zero X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cacddeab563be5850ec12ba6a1396e120f94a529;p=openwrt%2Fstaging%2Fblogic.git dm dust: remove redundant unsigned comparison to less than zero 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 Reviewed-by: Bryan Gurney Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-dust.c b/drivers/md/dm-dust.c index 178587bdc626..e739092bfc65 100644 --- a/drivers/md/dm-dust.c +++ b/drivers/md/dm-dust.c @@ -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; }