aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2009-01-07 21:14:28 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-12 22:48:02 -0500
commit2da7582f7cf5ef5e6adcf42537b6b8be06312152 (patch)
treef09865ae71dc2442e5ba65f44fff843ad92b9b85 /drivers
parentda9dc13289fa58dced12f2baff51dfb87c339ba3 (diff)
hvc_console: Use kzalloc() instead of kmalloc() + memset()
Replace kmalloc() + memset() with kzalloc(). Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hvc_console.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 0e18fdb9dddb..09676b4e5d89 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -765,13 +765,11 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
765 return ERR_PTR(err); 765 return ERR_PTR(err);
766 } 766 }
767 767
768 hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size, 768 hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
769 GFP_KERNEL); 769 GFP_KERNEL);
770 if (!hp) 770 if (!hp)
771 return ERR_PTR(-ENOMEM); 771 return ERR_PTR(-ENOMEM);
772 772
773 memset(hp, 0x00, sizeof(*hp));
774
775 hp->vtermno = vtermno; 773 hp->vtermno = vtermno;
776 hp->data = data; 774 hp->data = data;
777 hp->ops = ops; 775 hp->ops = ops;