From: Alexandru Gheorghiu Date: Wed, 3 Jul 2013 22:09:09 +0000 (-0700) Subject: drivers/parport/share.c: use kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c32df4e182e5bf40edde45da247318986d3cbf91;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/parport/share.c: use kzalloc Replaced calls to kmalloc and memset with kzalloc. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/parport/share.c b/drivers/parport/share.c index a848e02e6be3..6a83ee1e9178 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -282,14 +282,13 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, 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;