From: Milton Miller Date: Thu, 8 Jan 2009 02:14:28 +0000 (+0000) Subject: hvc_console: Use kzalloc() instead of kmalloc() + memset() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2da7582f7cf5ef5e6adcf42537b6b8be06312152;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 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, 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;