Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759343AbZAHMO4 (ORCPT ); Thu, 8 Jan 2009 07:14:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752779AbZAHMOc (ORCPT ); Thu, 8 Jan 2009 07:14:32 -0500 Received: from mercury.realtime.net ([205.238.132.86]:37581 "EHLO mercury.realtime.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbZAHMOb (ORCPT ); Thu, 8 Jan 2009 07:14:31 -0500 Subject: [PATCH 2/4] hvc_console: use kzalloc From: Milton Miller To: Christian Borntraeger , Benjiman Herrenschmidt cc: linuxppc-dev list , lkml , Joe Peterson , Alan Cox Message-Id: In-Reply-To: : Date: Thu, 08 Jan 2009 06:14:28 -0600 X-Originating-IP: 205.232.218.56 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 28 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/