]> www.infradead.org Git - users/hch/misc.git/commitdiff
kexec_core: remove redundant 0 value initialization
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Mon, 25 Aug 2025 12:33:05 +0000 (20:33 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 14 Sep 2025 00:32:49 +0000 (17:32 -0700)
The kimage struct is already zeroed by kzalloc(). It's redundant to
initialize image->head to 0.

Link: https://lkml.kernel.org/r/20250825123307.306634-1-liaoyuanhong@vivo.com
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/kexec_core.c

index 31203f0bacafaa255b80e19f926c749e80e20e60..fa00b239c5d9adda496588e1420d0f53f77c6a31 100644 (file)
@@ -233,7 +233,6 @@ struct kimage *do_kimage_alloc_init(void)
        if (!image)
                return NULL;
 
-       image->head = 0;
        image->entry = &image->head;
        image->last_entry = &image->head;
        image->control_page = ~0; /* By default this does not apply */