[PATCH 73] drivers/parport/share.c: kmalloc + memset conversion to kzalloc

From: Mariusz Kozlowski
Date: Tue Jul 31 2007 - 18:07:19 EST


Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>

drivers/parport/share.c | 29584 -> 29542 (-42 bytes)
drivers/parport/share.o | 117775 -> 117795 (+20 bytes)

drivers/parport/share.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.23-rc1-mm1-a/drivers/parport/share.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/parport/share.c 2007-07-30 00:14:05.000000000 +0200
@@ -282,14 +282,13 @@ struct parport *parport_register_port(un
int device;
char *name;

- tmp = kmalloc(sizeof(struct parport), GFP_KERNEL);
+ tmp = kzalloc(sizeof(struct parport), GFP_KERNEL);
if (!tmp) {
printk(KERN_WARNING "parport: memory squeeze\n");
return NULL;
}

/* Init our structure */
- memset(tmp, 0, sizeof(struct parport));
tmp->base = base;
tmp->irq = irq;
tmp->dma = dma;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/