diff options
-rw-r--r-- | drivers/md/dm-verity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c index 0d2e812d424b..9804da16a476 100644 --- a/drivers/md/dm-verity.c +++ b/drivers/md/dm-verity.c @@ -695,8 +695,8 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv) goto bad; } - if (sscanf(argv[0], "%d%c", &num, &dummy) != 1 || - num < 0 || num > 1) { + if (sscanf(argv[0], "%u%c", &num, &dummy) != 1 || + num > 1) { ti->error = "Invalid version"; r = -EINVAL; goto bad; |