summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-01 15:57:17 +0300
committerMike Snitzer <snitzer@redhat.com>2019-05-07 23:05:06 +0300
commitcacddeab563be5850ec12ba6a1396e120f94a529 (patch)
tree3ab4b162ea52c66484a01914e40359ae48feabcc /drivers/md
parent940bc471780b004a5277c1931f52af363c2fc9da (diff)
downloadlinux-cacddeab563be5850ec12ba6a1396e120f94a529.tar.xz
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 <colin.king@canonical.com> Reviewed-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-dust.c2
1 files changed, 1 insertions, 1 deletions
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;
}