mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 16:30:04 +01:00
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:
@@ -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, ¶ms, 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;
|
||||
|
||||
Reference in New Issue
Block a user