Remove redundant check for dm-integrity mapping table params section.

The dm-integrity table always contains number of feature arguments
(since introduction in kernel 4.12).

Moreover, the code already dereferences params field, so the test
make no sense.

Found by CodeQL check.
This commit is contained in:
Milan Broz
2025-01-27 21:39:47 +01:00
parent c9008528f9
commit e257def910

View File

@@ -2486,9 +2486,7 @@ static int _dm_target_query_integrity(struct crypt_device *cd,
tgt->u.integrity.sector_size = SECTOR_SIZE;
/* Features section */
if (params) {
/* Number of arguments */
/* Features section, number of arguments (always included) */
val64 = strtoull(params, &params, 10);
if (*params != ' ')
goto err;
@@ -2645,7 +2643,6 @@ static int _dm_target_query_integrity(struct crypt_device *cd,
r = -EINVAL;
goto err;
}
}
if (data_device)
tgt->data_device = data_device;