From patchwork Sun Jun 1 12:39:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4277991 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 AFDD9BEEA7 for ; Sun, 1 Jun 2014 12:38:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E452F20351 for ; Sun, 1 Jun 2014 12:38:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C572C20340 for ; Sun, 1 Jun 2014 12:38:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756981AbaFAMi2 (ORCPT ); Sun, 1 Jun 2014 08:38:28 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:56745 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753296AbaFAMi1 (ORCPT ); Sun, 1 Jun 2014 08:38:27 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi2so3205831wib.17 for ; Sun, 01 Jun 2014 05:38:26 -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=lZdqpaayJNMeV+f4AxmCiqD4jSqERoDs1QTtKNv2bQc=; b=QBGtbGqgOikCaVi9ONZcZmTtMaDsSomriYGoPsSAQHDCWqLHCesR4/WqwI2M/+zWAF /Bwej8R8eakB4v+KLLnaK3aCgw/vv+ba1ZoxtGY5v5eBC8g+Y4AVBh6/MMsM89xpY9NE svHKPvfs9o5gDcppIQ1TBhROujxYSk93tZrezGjqdRPoKjyp/yvOGdj+XXaErutRdST4 pmr92KSZUWdrYwOjTIH9OXD4pdlF+f/fXpratVCU3AHmOIIDIwLpTBWHlMry0zpbEWuF 8g3KjRycykQTEKqBRIvjGeTXCAxW25JaWjGFdI1R7teXrPAJIqIomiTHnF+x48CJEhbc vCXQ== X-Gm-Message-State: ALoCoQkvSl+BDFhiHmw6Xh2V5RA1oBq/0bimha3EAhJ96fB9/hb5i+C3nO64OlE3DtYfEB9RtknA X-Received: by 10.180.182.115 with SMTP id ed19mr13913303wic.29.1401626306760; Sun, 01 Jun 2014 05:38:26 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id lq14sm23281799wic.7.2014.06.01.05.38.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 05:38:25 -0700 (PDT) From: Rickard Strandqvist To: "John W. Linville" , Rickard Strandqvist Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: wireless: libertas: cmd.c: Cleaning up uninitialized variables Date: Sun, 1 Jun 2014 14:39:20 +0200 Message-Id: <1401626360-15505-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/libertas/cmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index aaa2973..0387a5b 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -1111,6 +1111,7 @@ int lbs_set_radio(struct lbs_private *priv, u8 preamble, u8 radio_on) cmd.hdr.size = cpu_to_le16(sizeof(cmd)); cmd.action = cpu_to_le16(CMD_ACT_SET); + cmd.control = 0; /* Only v8 and below support setting the preamble */ if (priv->fwrelease < 0x09000000) {