summaryrefslogtreecommitdiff
path: root/drivers/char/consolemap.c
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-10-17 10:26:43 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 19:42:50 +0400
commit392b7bc13e9e9390bd2deb923d0326c3a50a9a00 (patch)
tree0a1a21f99167dc155dea9fc4895d1df8807b84e9 /drivers/char/consolemap.c
parent0b15d04af3dd996035d8fa81fc849d049171f9c3 (diff)
downloadlinux-392b7bc13e9e9390bd2deb923d0326c3a50a9a00.tar.xz
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 <m.kozlowski@tuxland.pl> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/consolemap.c')
-rw-r--r--drivers/char/consolemap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c
index 4b3916f54909..163f3fce3f84 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 {