From patchwork Sun Jan 26 10:53:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3539741 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1320FC02DC for ; Sun, 26 Jan 2014 10:58:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6436820123 for ; Sun, 26 Jan 2014 10:58:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90CCF20121 for ; Sun, 26 Jan 2014 10:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbaAZK61 (ORCPT ); Sun, 26 Jan 2014 05:58:27 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:54895 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbaAZK61 (ORCPT ); Sun, 26 Jan 2014 05:58:27 -0500 X-Greylist: delayed 300 seconds by postgrey-1.27 at vger.kernel.org; Sun, 26 Jan 2014 05:58:26 EST Received: from ayla.of.borg ([84.193.72.141]) by andre.telenet-ops.be with bizsmtp id JatP1n00232ts5g01atPRu; Sun, 26 Jan 2014 11:53:25 +0100 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1W7NL8-0002vs-Tz; Sun, 26 Jan 2014 11:53:22 +0100 From: Geert Uytterhoeven To: Felix Fietkau , "John W. Linville" , QCA ath9k Development Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] ath9k: Fix uninitialized variable in ath9k_has_tx_pending() Date: Sun, 26 Jan 2014 11:53:21 +0100 Message-Id: <1390733601-11244-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath9k/main.c: In function ‘ath9k_has_tx_pending’: drivers/net/wireless/ath/ath9k/main.c:1869: warning: ‘npend’ may be used uninitialized in this function Introduced by commit 10e2318103f5941aa70c318afe34bc41f1b98529 ("ath9k: optimize ath9k_flush"). Signed-off-by: Geert Uytterhoeven Acked-by: Felix Fietkau --- This doesn't look like a false positive to me drivers/net/wireless/ath/ath9k/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5924f72dd493..f08d5051c13f 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1866,7 +1866,7 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) static bool ath9k_has_tx_pending(struct ath_softc *sc) { - int i, npend; + int i, npend = 0; for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { if (!ATH_TXQ_SETUP(sc, i))