From patchwork Thu Mar 28 09:11:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 2355621 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D124CDF2A1 for ; Thu, 28 Mar 2013 09:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755932Ab3C1JSp (ORCPT ); Thu, 28 Mar 2013 05:18:45 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:38545 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755888Ab3C1JSo (ORCPT ); Thu, 28 Mar 2013 05:18:44 -0400 Received: from romuald.bergerie (unknown [88.178.86.202]) by smtp1-g21.free.fr (Postfix) with ESMTP id ACC459402B3 for ; Thu, 28 Mar 2013 10:18:32 +0100 (CET) Received: by romuald.bergerie (Postfix, from userid 65534) id 4248812DF2; Thu, 28 Mar 2013 10:11:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on romuald.bergerie X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED, FH_FROMEML_NOTLD autolearn=no version=3.3.2 Received: from einstein.bergerie (localhost [IPv6:::1]) by romuald.bergerie (Postfix) with SMTP id A7D151985; Thu, 28 Mar 2013 10:11:36 +0100 (CET) Received: by einstein.bergerie (sSMTP sendmail emulation); Thu, 28 Mar 2013 10:11:35 +0100 From: "Vincent" To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, =?UTF-8?q?Vincent=20Stehl=C3=A9?= Subject: [PATCH] mac80211: fix uninitialized variable Date: Thu, 28 Mar 2013 10:11:34 +0100 Message-Id: <1364461894-30555-1-git-send-email-vincent.stehle@laposte.net> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix one code path where chanctx_conf is tested as being non-NULL while it may be uninitialized. This fixes the following warning: net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’: net/mac80211/tx.c:1828:27: warning: ‘chanctx_conf’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Vincent Stehlé Cc: Johannes Berg --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8914d2d..57a5722 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1777,7 +1777,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, bool multicast; u32 info_flags = 0; u16 info_id = 0; - struct ieee80211_chanctx_conf *chanctx_conf; + struct ieee80211_chanctx_conf *chanctx_conf = NULL; struct ieee80211_sub_if_data *ap_sdata; enum ieee80211_band band;