summaryrefslogtreecommitdiffstats
path: root/drivers/parport/share.c
diff options
context:
space:
mode:
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>2013-07-03 15:09:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 16:08:06 -0700
commitc32df4e182e5bf40edde45da247318986d3cbf91 (patch)
tree332589694a6905bf75b3d0736a108120b91ed903 /drivers/parport/share.c
parent8da01af45e197110cbce84fb5ccb54645f051ac6 (diff)
downloadblackbird-op-linux-c32df4e182e5bf40edde45da247318986d3cbf91.tar.gz
blackbird-op-linux-c32df4e182e5bf40edde45da247318986d3cbf91.zip
drivers/parport/share.c: use kzalloc
Replaced calls to kmalloc and memset with kzalloc. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/parport/share.c')
-rw-r--r--drivers/parport/share.c3
1 files changed, 1 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud