From patchwork Thu May 13 20:02:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 99401 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4DK4LKx021837 for ; Thu, 13 May 2010 20:04:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932784Ab0EMUDG (ORCPT ); Thu, 13 May 2010 16:03:06 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:42016 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932771Ab0EMUDB (ORCPT ); Thu, 13 May 2010 16:03:01 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 8ADD819BBA9; Thu, 13 May 2010 22:03:00 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05039-08; Thu, 13 May 2010 22:02:56 +0200 (CEST) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 78EEC19BBA2; Thu, 13 May 2010 22:02:56 +0200 (CEST) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id AB7956DFBB6; Thu, 13 May 2010 21:55:47 +0200 (CEST) Received: by ask.diku.dk (Postfix, from userid 3767) id 59843200BD; Thu, 13 May 2010 22:02:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 51978200BC; Thu, 13 May 2010 22:02:56 +0200 (CEST) Date: Thu, 13 May 2010 22:02:56 +0200 (CEST) From: Julia Lawall To: Pavel Roskin , David Gibson , "John W. Linville" , linux-wireless@vger.kernel.org, orinoco-users@lists.sourceforge.net, orinoco-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 11/20] drivers/net/wireless/orinoco: Use kzalloc Message-ID: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 13 May 2010 20:04:21 +0000 (UTC) diff -u -p a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c --- a/drivers/net/wireless/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/orinoco/orinoco_usb.c @@ -356,12 +356,10 @@ static struct request_context *ezusb_all { struct request_context *ctx; - ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC); + ctx = kzalloc(sizeof(*ctx), GFP_ATOMIC); if (!ctx) return NULL; - memset(ctx, 0, sizeof(*ctx)); - ctx->buf = kmalloc(BULK_BUF_SIZE, GFP_ATOMIC); if (!ctx->buf) { kfree(ctx);