aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2009-01-08 02:14:28 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-13 14:48:02 +1100
commit2da7582f7cf5ef5e6adcf42537b6b8be06312152 (patch)
treef09865ae71dc2442e5ba65f44fff843ad92b9b85 /drivers/char/hvc_console.c
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/char/hvc_console.c')
-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 0e18fdb9ddd..09676b4e5d8 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,
return ERR_PTR(err);
}
- hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
+ hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
GFP_KERNEL);
if (!hp)
return ERR_PTR(-ENOMEM);
- memset(hp, 0x00, sizeof(*hp));
-
hp->vtermno = vtermno;
hp->data = data;
hp->ops = ops;