Skip to contentSkip to conversation

kernel: Replace kmalloc/memset with kzalloc.

PATCH New Panagiotis Issaris 1 participant 1 message Nov 9, 2005 kexec

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: Replace kmalloc/memset with kzalloc.

Replace kmalloc/memset by kzalloc.

---

 kernel/kexec.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

applies-to: 7085a0d56a035f94f292df54c7fe19d822904cec bc3653f82726b556fbb5c7958f82c5b1e99c2860

kernel/kexec.c +1 -2
index 2c95848..94df70f 100644
@@ -104,11 +104,10 @@ static int do_kimage_alloc(struct kimage
 
 	/* Allocate a controlling structure */
 	result = -ENOMEM;
-	image = kmalloc(sizeof(*image), GFP_KERNEL);
+	image = kzalloc(sizeof(*image), GFP_KERNEL);
 	if (!image)
 		goto out;
 
-	memset(image, 0, sizeof(*image));
 	image->head = 0;
 	image->entry = &image->head;
 	image->last_entry = &image->head;

---
0.99.9.GIT