From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [PATCH, new ACPI driver] new sony_acpi driver Date: Fri, 11 Feb 2005 14:02:19 +0200 Message-ID: <84144f02050211040253e33dab@mail.gmail.com> References: <20050210161809.GK3493@crusoe.alcove-fr> <20050211113636.GI3263@crusoe.alcove-fr> Reply-To: Pekka Enberg Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20050211113636.GI3263@crusoe.alcove-fr> Sender: linux-kernel-owner@vger.kernel.org To: Stelian Pop , Linux Kernel Mailing List , Andrew Morton , acpi-devel@lists.sourceforge.net, Jean Delvare , Pekka Enberg List-Id: linux-acpi@vger.kernel.org On Fri, 11 Feb 2005 12:36:37 +0100, Stelian Pop wrote: > +static int __init sony_acpi_add(struct acpi_device *device) > +{ > + acpi_status status = AE_OK; > + struct sony_snc *snc = NULL; > + int result; > + > + snc = kmalloc(sizeof(struct sony_snc), GFP_KERNEL); > + if (!snc) > + return -ENOMEM; > + memset(snc, 0, sizeof(struct sony_snc)); Nitpick: use kcalloc() instead of kmalloc() and memset(). Pekka