From d323c1a9477a82843795f10fb23f1634cea44007 Mon Sep 17 00:00:00 2001 From: Jan Höppner Date: Fri, 15 Sep 2023 15:09:59 +0200 Subject: partitions/ibm: Remove unnecessary memset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- block/partitions/ibm.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'block') 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; } -- cgit 1.2.3-korg