]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
hvc_console: Use kzalloc() instead of kmalloc() + memset()
authorMilton Miller <miltonm@bga.com>
Thu, 8 Jan 2009 02:14:28 +0000 (02:14 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 13 Jan 2009 03:48:02 +0000 (14:48 +1100)
Replace kmalloc() + memset()  with kzalloc().

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/char/hvc_console.c

index 0e18fdb9dddb5c642f7092bc4ce2cf076a6ac1d2..09676b4e5d8964d77a4cc555cbe30e616c62e7b0 100644 (file)
@@ -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;