From: Mariusz Kozlowski Date: Wed, 17 Oct 2007 06:26:43 +0000 (-0700) Subject: drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc X-Git-Tag: v2.6.24-rc1~724 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=392b7bc13e9e9390bd2deb923d0326c3a50a9a00;p=linux-2.6-omap-h63xx.git drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc drivers/char/consolemap.c | 22678 -> 22650 (-28 bytes) drivers/char/consolemap.o | 90113 -> 90029 (-84 bytes) Signed-off-by: Mariusz Kozlowski Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index 4b3916f5490..163f3fce3f8 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c @@ -494,12 +494,11 @@ int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui) p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; if (p && p->readonly) return -EIO; if (!p || --p->refcount) { - q = kmalloc(sizeof(*p), GFP_KERNEL); + q = kzalloc(sizeof(*p), GFP_KERNEL); if (!q) { if (p) p->refcount++; return -ENOMEM; } - memset(q, 0, sizeof(*q)); q->refcount=1; *vc->vc_uni_pagedir_loc = (unsigned long)q; } else {