Skip to contentSkip to conversation

kzalloc conversion in kernel/kexec.c

PATCH New Eric Sesterhenn 1 participant 1 message Feb 21, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kzalloc conversion in kernel/kexec.c

hi,

this patch converts kernel/kexec.c to kzalloc() usage. A similar patch was send to lkml 9.Nov 2005 by Panagiotis Issaris <[email protected]> but seems to got lost.

kernel/kexec.c renamed from kernel/kexec.c.orig +1 -2
@@ -108,11 +108,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;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors