From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mercury.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 18F03476AD for ; Thu, 8 Jan 2009 23:14:48 +1100 (EST) Subject: [PATCH 2/4] hvc_console: use kzalloc From: Milton Miller To: Christian Borntraeger , Benjiman Herrenschmidt Message-Id: In-Reply-To: : Date: Thu, 08 Jan 2009 06:14:28 -0600 Cc: linuxppc-dev list , lkml , Alan Cox , Joe Peterson List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Replace kmalloc + memset with kzalloc. Signed-off-by: Milton Miller 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;