diff options
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index fcdd5d2bc3f4..d43692cf2321 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -108,11 +108,10 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry, | |||
108 | 108 | ||
109 | /* Allocate a controlling structure */ | 109 | /* Allocate a controlling structure */ |
110 | result = -ENOMEM; | 110 | result = -ENOMEM; |
111 | image = kmalloc(sizeof(*image), GFP_KERNEL); | 111 | image = kzalloc(sizeof(*image), GFP_KERNEL); |
112 | if (!image) | 112 | if (!image) |
113 | goto out; | 113 | goto out; |
114 | 114 | ||
115 | memset(image, 0, sizeof(*image)); | ||
116 | image->head = 0; | 115 | image->head = 0; |
117 | image->entry = &image->head; | 116 | image->entry = &image->head; |
118 | image->last_entry = &image->head; | 117 | image->last_entry = &image->head; |