]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Wed, 17 Oct 2007 06:26:43 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:50 +0000 (08:42 -0700)
 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>
drivers/char/consolemap.c

index 4b3916f549099d16b1a1ed1cb6d280eeafcd02ad..163f3fce3f84e2ca2ea827f5bdd6acd78506194e 100644 (file)
@@ -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 {