From patchwork Sun Jun 1 14:07:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4278641 Return-Path: X-Original-To: patchwork-alsa-devel@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 CA2BB9F326 for ; Sun, 1 Jun 2014 14:07:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10C5020351 for ; Sun, 1 Jun 2014 14:07:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CBE34202F8 for ; Sun, 1 Jun 2014 14:07:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C612726533B; Sun, 1 Jun 2014 16:07:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6C95B26530F; Sun, 1 Jun 2014 16:07:01 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 03E8C265314; Sun, 1 Jun 2014 16:06:59 +0200 (CEST) Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by alsa0.perex.cz (Postfix) with ESMTP id EA29B26530F for ; Sun, 1 Jun 2014 16:06:51 +0200 (CEST) Received: by mail-we0-f174.google.com with SMTP id k48so3997658wev.19 for ; Sun, 01 Jun 2014 07:06:51 -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=mTgP1M8ugf8eWxoVxw9nGlDpJurSU/xZ6ej2lTG6yX8=; b=b5iSz3jacKM4B3gfv+KUu9f/mWwJIYvFkzL9OxugkB2W6hyF3rA85GA/f0Py/i5Br0 k7YS+IEQXIIUOpkdtUVXvHNmD4KyHWflFRzs8BFNG140CXEDskjWs8dyL/ibE+vFFulu GR6HRlxKXf4Ia6WL5TR/DhsHQ1b0IM0v+40+IfGm+ssb6sDHpmekUBJrm0FSuX02SVIg kYQmOcW4n04r8Q8e2mYRDdIIKaNNEDFJObyo53UX1BWYv/JIn1Y8uXnGF7mRVywOg8hU xhIwvA6zq10DOXcD3wQySooj8pIu9m9UeBW2FwzcYdWspaC3fkJWlaIgtpqfUpr2x2Ao 552g== X-Gm-Message-State: ALoCoQm7NUwOGFZ2oC8l0AEbKMn/fR+YrIS4VvmeYdQjbr/aX0+cbzPTHQyZ+1a5V7HHQAnLWTx4 X-Received: by 10.180.11.9 with SMTP id m9mr14563578wib.51.1401631611641; Sun, 01 Jun 2014 07:06:51 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id l4sm23876718wiy.0.2014.06.01.07.06.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 07:06:50 -0700 (PDT) From: Rickard Strandqvist To: Jaroslav Kysela , Takashi Iwai Date: Sun, 1 Jun 2014 16:07:45 +0200 Message-Id: <1401631665-21470-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rickard Strandqvist Subject: [alsa-devel] [PATCH] sound: pci: ice1712: wm8776.c: Cleaning up uninitialized variables X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.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 --- sound/pci/ice1712/wm8776.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/ice1712/wm8776.c b/sound/pci/ice1712/wm8776.c index e66c0da..52da0ff 100644 --- a/sound/pci/ice1712/wm8776.c +++ b/sound/pci/ice1712/wm8776.c @@ -510,7 +510,7 @@ static int snd_wm8776_ctl_get(struct snd_kcontrol *kcontrol, { struct snd_wm8776 *wm = snd_kcontrol_chip(kcontrol); int n = kcontrol->private_value; - u16 val1, val2; + u16 val1 = 0, val2 = 0; if (wm->ctl[n].get) wm->ctl[n].get(wm, &val1, &val2);