Message ID | 20240726071416.36759-13-xni@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | mdadm: fix coverity issues | expand |
Context | Check | Description |
---|---|---|
mdraidci/vmtest-md-6_11-PR | success | PR summary |
mdraidci/vmtest-md-6_11-VM_Test-0 | success | Logs for build-kernel |
diff --git a/super1.c b/super1.c index 4e4c7bfd15ae..24bc10269dbf 100644 --- a/super1.c +++ b/super1.c @@ -1466,8 +1466,6 @@ static int update_super1(struct supertype *st, struct mdinfo *info, __le32_to_cpu(sb->chunksize)); if (space > optimal_space) space = optimal_space; - if (space > UINT16_MAX) - space = UINT16_MAX; } sb->ppl.offset = __cpu_to_le16(offset);
optimal_space is at most 2046. So space can't be larger than UINT16_MAX. Signed-off-by: Xiao Ni <xni@redhat.com> --- super1.c | 2 -- 1 file changed, 2 deletions(-)