From: Milton Miller Date: Thu, 8 Jan 2009 02:14:28 +0000 (+0000) Subject: hvc_console: Use kzalloc() instead of kmalloc() + memset() X-Git-Tag: v2.6.29-rc2~76^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2da7582f7cf5ef5e6adcf42537b6b8be06312152;p=linux-2.6-omap-h63xx.git hvc_console: Use kzalloc() instead of kmalloc() + memset() Replace kmalloc() + memset() with kzalloc(). Signed-off-by: Milton Miller Signed-off-by: Benjamin Herrenschmidt --- 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;