From patchwork Sun Jun 1 12:29:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4277951 Return-Path: X-Original-To: patchwork-linux-media@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 BE1119F326 for ; Sun, 1 Jun 2014 12:28:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F326920340 for ; Sun, 1 Jun 2014 12:28:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81544202E6 for ; Sun, 1 Jun 2014 12:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756261AbaFAM22 (ORCPT ); Sun, 1 Jun 2014 08:28:28 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:64186 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753296AbaFAM20 (ORCPT ); Sun, 1 Jun 2014 08:28:26 -0400 Received: by mail-we0-f172.google.com with SMTP id k48so3999954wev.31 for ; Sun, 01 Jun 2014 05:28:25 -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=u3JtFaHVJlQokvzPaWd3APcjYX+k8piHSFtiAi4z8gY=; b=mOB44vRpv/y6peTxJmL0eM2pVKLCOjxkgXjpxkoUe6e1t0ZjvMEobOvrEfnqqV7dav F3Ue0lrhMTkowOrgUX5GeiSzcKY6Z355SMkesYp0V71jV3wQdSf+jNObMdCuVsUPyGC4 HpAfWr9BP1lC1wxjBMNMSdIHLFbyF7ZeDf6TAwOms3qviYcRaGEbU2WVxy1FFZFcH3q7 Rerss6cyc2r4HhBPx0tkcnbFyKEDyeJS6MlkpQmqceKyl/tux8ZF3im2FolCTNB80EcZ oxOebWZbLN88ltXG1R086trkJD/WOVwtqP0Gjhs1EN7j2Ia9DKkLxgkOM4nUQI1Vo0kD WHFg== X-Gm-Message-State: ALoCoQl99dZTeXf+DUizzjEsmeBaj0IdlG3AtmceGVt6DOTFTaCXl3iM0kxDZXqgW0fg3uKdfDFg X-Received: by 10.180.198.178 with SMTP id jd18mr14228973wic.24.1401625705641; Sun, 01 Jun 2014 05:28:25 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id bn7sm26568554wjc.7.2014.06.01.05.28.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 05:28:24 -0700 (PDT) From: Rickard Strandqvist To: Michael Krufky , Mauro Carvalho Chehab Cc: Rickard Strandqvist , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables Date: Sun, 1 Jun 2014 14:29:19 +0200 Message-Id: <1401625759-14610-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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/media/usb/dvb-usb-v2/mxl111sf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c index c7304fa..b8a707e 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c @@ -129,7 +129,7 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state, u8 addr, u8 mask, u8 data) { int ret; - u8 val; + u8 val = 0; if (mask != 0xff) { ret = mxl111sf_read_reg(state, addr, &val);