[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <hvc-console-29-3-2@bga.com>
Date: Thu, 08 Jan 2009 06:14:28 -0600
From: Milton Miller <miltonm@....com>
To: Christian Borntraeger <borntraeger@...ibm.com>,
Benjiman Herrenschmidt <benh@...nel.crashing.org>
cc: linuxppc-dev list <linuxppc-dev@...abs.org>,
lkml <linux-kernel@...r.kernel.org>,
Joe Peterson <joe@...rush.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: [PATCH 2/4] hvc_console: use kzalloc
Replace kmalloc + memset with kzalloc.
Signed-off-by: Milton Miller <miltonm@....com>
Index: work.git/drivers/char/hvc_console.c
===================================================================
--- work.git.orig/drivers/char/hvc_console.c 2009-01-08 04:24:10.000000000 -0600
+++ work.git/drivers/char/hvc_console.c 2009-01-08 04:24:35.000000000 -0600
@@ -765,13 +765,11 @@ struct hvc_struct __devinit *hvc_alloc(u
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists