From: Jan Höppner Date: Fri, 15 Sep 2023 13:09:59 +0000 (+0200) Subject: partitions/ibm: Remove unnecessary memset X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d323c1a9477a82843795f10fb23f1634cea44007;p=linux.git partitions/ibm: Remove unnecessary memset The data holding the volume label information is zeroed in case no valid volume label was found. Since the label information isn't used in that case, zeroing the data doesn't provide any value whatsoever. Remove the unnecessary memset() call accordingly. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20230915131001.697070-2-sth@linux.ibm.com Signed-off-by: Jens Axboe --- diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c index 403756dbd50d9..49eb0e354fc4b 100644 --- a/block/partitions/ibm.c +++ b/block/partitions/ibm.c @@ -124,8 +124,6 @@ static int find_label(struct parsed_partitions *state, break; } } - if (!found) - memset(label, 0, sizeof(*label)); return found; }