From patchwork Mon Nov 7 15:41:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9415421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22E5960585 for ; Mon, 7 Nov 2016 15:43:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C582869B for ; Mon, 7 Nov 2016 15:43:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09F02289F3; Mon, 7 Nov 2016 15:43:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00E772869B for ; Mon, 7 Nov 2016 15:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932526AbcKGPnC (ORCPT ); Mon, 7 Nov 2016 10:43:02 -0500 Received: from resqmta-po-09v.sys.comcast.net ([96.114.154.168]:48859 "EHLO resqmta-po-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932327AbcKGPlU (ORCPT ); Mon, 7 Nov 2016 10:41:20 -0500 Received: from resomta-po-16v.sys.comcast.net ([96.114.154.240]) by resqmta-po-09v.sys.comcast.net with SMTP id 3m2yclBEPS0FE3m2ychAeH; Mon, 07 Nov 2016 15:41:20 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-16v.sys.comcast.net with SMTP id 3m2wcuRAWwz9x3m2wckVwW; Mon, 07 Nov 2016 15:41:20 +0000 Received: from localhost.localdomain (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 42D5C9F4E6; Mon, 7 Nov 2016 08:41:17 -0700 (MST) From: Shuah Khan To: mchehab@kernel.org, wsa-dev@sang-engineering.com, gregkh@linuxfoundation.org, keescook@chromium.org, akpm@linux-foundation.org, sean@mess.org, patrick.boettcher@posteo.de Cc: Shuah Khan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion() Date: Mon, 7 Nov 2016 08:41:12 -0700 Message-Id: <20161107154114.26803-2-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161107154114.26803-1-shuahkh@osg.samsung.com> References: <20161107154114.26803-1-shuahkh@osg.samsung.com> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfH4Qe8WrBImKciZtTVeKN52V8TGNxwWh1Wux/jIuleUodXM2zaD4g6ufHfumYb40gGu5ytpj/mqR6DpE3taI/Tpv6HGCP0oCiDvHHcu188MfK2lZ35D1 EQk0Ho/brG1eiig0TqdxW1G8JKZpQVNCyDvDacAgaYVZM+VeGGMqZN7pTk7HQlrD+jh2zArGvOOzLKEF7X8pCfgPAirrLO0ckC5Dok3MhWS8BX0EWIUMs6v1 nlvbDYP+/ze7zWN77/1mC7RksywuvDHDUI8DQGRhwE01VjCLjvhz+bm9ESf3mnAH6z2Z3UOmEAi+rQ4l9REj4PYj4Y2MTI6Mc9dvI3ovsnIPv4rKXnIgF32O miAOGmY445mxTg76+MNWlj5s91EvIPRe2hQ4F4mMz6FsVy+rBMZY3uQwqQEHnsy0ZTChSb+uioi9tAK4ryEj5D9Tv23XepLYL3Q2OUikbPdH3XbYTZXHnu2w ySMH8QFUKbDx6CMbZTGFWXV3IS07YxqPirjCkOx/EUM6rX38/kTFeLPDp7c= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following uninitialized variable compiler warning: drivers/media/usb/dvb-usb/dib0700_core.c: In function ‘dib0700_rc_urb_completion’: drivers/media/usb/dvb-usb/dib0700_core.c:763:2: warning: ‘protocol’ may be used uninitialized in this function [-Wmaybe-uninitialized] rc_keydown(d->rc_dev, protocol, keycode, toggle); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan --- drivers/media/usb/dvb-usb/dib0700_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c index f319665..cfe28ec 100644 --- a/drivers/media/usb/dvb-usb/dib0700_core.c +++ b/drivers/media/usb/dvb-usb/dib0700_core.c @@ -676,7 +676,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) { struct dvb_usb_device *d = purb->context; struct dib0700_rc_response *poll_reply; - enum rc_type protocol; + enum rc_type protocol = RC_TYPE_UNKNOWN; u32 uninitialized_var(keycode); u8 toggle;