From patchwork Sun Jun 1 12:49:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4278051 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B02B9F1D6 for ; Sun, 1 Jun 2014 12:48:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6A7920340 for ; Sun, 1 Jun 2014 12:48:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CE362020E for ; Sun, 1 Jun 2014 12:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756925AbaFAMsQ (ORCPT ); Sun, 1 Jun 2014 08:48:16 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:63482 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130AbaFAMsP (ORCPT ); Sun, 1 Jun 2014 08:48:15 -0400 Received: by mail-wg0-f52.google.com with SMTP id l18so3956336wgh.35 for ; Sun, 01 Jun 2014 05:48:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=i1xB+3JU94KMn+Ox8UmrnNbgj4U7KRmw4R0gxEr/EoQ=; b=YNusyHEmRu0fd1OolhYI2iuPIma5adGGFbfnPgKqiyVzo9QR6LxzM+SBOjRV3nX9r1 hS+7OM75a0+4y82pMfygpnnNWKrY0Jm7FqazA6w4qLzIBW+BqO/4+oYGVcj/x0mcOiCG 6v2Bz3uW4z8sI7BuyjKwiQoIFfdFgVcRgCqEArGqFuQYewBcHQEyfXvNISUPtiXWQH2g SOmVf2xRc/jAFe5eFMUMm3cvaIDuxpRjGeoC1kNfiX1yD2Pi6DA5xAWu14RzmtvS2dZq Qrwo9snzy/9md8Ie076wCrrxbcLpqFMsc8Eq6y0u8BEN/UTR2/UeD0ArprAVf2hY3GU9 bH6A== X-Gm-Message-State: ALoCoQmqcHWBQK386DQtqddUcWUXdFbCeds+RjEXYk8qMOINxdlf3/8QRrUgK+6rmujOROdAPc1t X-Received: by 10.194.61.193 with SMTP id s1mr41421670wjr.36.1401626894008; Sun, 01 Jun 2014 05:48:14 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id m1sm23314727wib.20.2014.06.01.05.48.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 05:48:13 -0700 (PDT) From: Rickard Strandqvist To: Larry Finger , Chaoming Li Cc: Rickard Strandqvist , "John W. Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variables Date: Sun, 1 Jun 2014 14:49:08 +0200 Message-Id: <1401626948-16183-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 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.5 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 There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 3d1f0dd..66abaf6 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c @@ -203,11 +203,11 @@ u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask) struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_hal *rtlhal = rtl_hal(rtlpriv); u32 returnvalue, originalvalue, bitshift; - u8 dbi_direct; RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "regaddr(%#x), bitmask(%#x)\n", regaddr, bitmask); if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) { + u8 dbi_direct = 0; /* mac1 use phy0 read radio_b. */ /* mac0 use phy1 read radio_b. */ if (rtlhal->during_mac1init_radioa)