From patchwork Thu May 27 18:41:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prarit Bhargava X-Patchwork-Id: 102752 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 o4RIfOmp031327 for ; Thu, 27 May 2010 18:41:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759491Ab0E0SlW (ORCPT ); Thu, 27 May 2010 14:41:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43960 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759477Ab0E0SlW (ORCPT ); Thu, 27 May 2010 14:41:22 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4RIfLtU029539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 May 2010 14:41:21 -0400 Received: from prarit.bos.redhat.com (prarit.bos.redhat.com [10.16.16.23]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4RIfKPv001762; Thu, 27 May 2010 14:41:20 -0400 Date: Thu, 27 May 2010 14:41:20 -0400 From: Prarit Bhargava To: linux-wireless@vger.kernel.org, linville@tuxdriver.com Cc: Prarit Bhargava Message-Id: <20100527183717.24368.49914.sendpatchset@prarit.bos.redhat.com> Subject: [PATCH]: libertas: fix uninitialized variable warning X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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, 27 May 2010 18:41:24 +0000 (UTC) diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index e2b8d88..2319bde 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c @@ -330,9 +330,8 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, /* create the exported radio header */ /* radiotap header */ - radiotap_hdr.hdr.it_version = 0; - /* XXX must check this value for pad */ - radiotap_hdr.hdr.it_pad = 0; + memset(&radiotap_hdr, 0, sizeof(radiotap_hdr)); + /* XXX must check radiotap_hdr.hdr.it_pad for pad */ radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr)); radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT); radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);