From patchwork Fri Oct 14 11:43:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9376439 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 281D560779 for ; Fri, 14 Oct 2016 11:43:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 191242A652 for ; Fri, 14 Oct 2016 11:43:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DE5C2A65A; Fri, 14 Oct 2016 11:43:45 +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 D95302A652 for ; Fri, 14 Oct 2016 11:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754569AbcJNLnW (ORCPT ); Fri, 14 Oct 2016 07:43:22 -0400 Received: from mout.web.de ([212.227.15.3]:55645 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754874AbcJNLnR (ORCPT ); Fri, 14 Oct 2016 07:43:17 -0400 Received: from [192.168.1.2] ([78.49.117.2]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0M7blv-1crwZV18qd-00xNjY; Fri, 14 Oct 2016 13:43:10 +0200 Subject: [PATCH 3/5] [media] winbond-cir: Move assignments for three variables in wbcir_shutdown() To: linux-media@vger.kernel.org, =?UTF-8?Q?David_H=c3=a4rdeman?= , Mauro Carvalho Chehab , Sean Young References: <566ABCD9.1060404@users.sourceforge.net> <1d7d6a2c-0f1e-3434-9023-9eab25bb913f@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <285954ec-280f-8a5a-5189-eb2471b4339c@users.sourceforge.net> Date: Fri, 14 Oct 2016 13:43:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1d7d6a2c-0f1e-3434-9023-9eab25bb913f@users.sourceforge.net> X-Provags-ID: V03:K0:UwAkgCnpJP/rLVH7AqS9t5qC7kJJjolDRQfVI6mNc4hwjrf2JMX jQ68plcx0U5oJUkwkakiJHjvyA+615dX1Yt4JsuMMXgXKO3qNdDpJ7M+c/5z3hvk+jt2INT AO1FHyZ0y6b3AFz6JY8XBJkoJzODFHBwR622R46XHn1zxlfvflsqjJdzFmkTrGLUa8pGn8T 7eYoJjeuNQkuPOg9Swnyg== X-UI-Out-Filterresults: notjunk:1; V01:K0:uoIVSad51bY=:KWbYtPBzrqrvRCiWPtXOed 9MIQ5WVhYm6jYP5tvkGLtv6UeBaTcWNlFM7OECRIE7RmtEptPh0NrJnYm/4vEtDDot8HrDdnV 89XpYawJq5G/QP3zdeMpPEs0LTLxGWX3ZK0+jat68OeoypPKc4RwQYi4QdpKomfj9SBIck88V ObWacY/zWnI2PT9F6KHV6T8maiHuZgxk/mIm6R1p5qaP7ed//L8Lr0Du66GGLHEOCQz+1bNXo lCex/xbY6Gzv/F0QV/AYH8fSIFl9HS0l2kRV2NZiVh7eodQocHpVbLw3TzHkVsgCJaRXIieJw lJKXOlku9Z+/HyJNdb5C5oMNqgqzvcWdVsrPnPNAQrS6b11Ul5LO7ITppN+nyEjXkuNFXjKal FnLZqhq69eofaRtBb9jTGF3TE5QYPpmovy6yOfYzbzO5MQPorgaqYHovpn4weDKYb8s3hR+Sg uhq1S7ne4cdDBu6aR2bKw4hfszGTpvQWtggTHtPnGCmq980B7cYqczqoFo2D8j2ZLemuYvAnJ SPoFyebYuQecG8q1e1JKFBCPOR097O0oyjjwrwFT18KWa+pGDwfn5UnjyzlYNc5yc1TajxqDB RtII3x+v/E5DCUoEIEdsCMRJKZS7YrQ6xI72zxWt+Rt7XyTsJ4YgxdXdjFXTa6Mixk+Ft+lvA qQKE9X3v/qGWrQPU3K+grRqrz3oQNl1rCymAyjN9fuK89/SQNkqyx6C/4GSdwpyvKMXzjuMvH nhgyO8ClHREnyCjdeDkc9UptdP7pSoRB3ztAv0qikFGWq+5yAGBp6Bxg5f+16kUJ+6Q9AV+5p Glvjq4O 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 From: Markus Elfring Date: Fri, 14 Oct 2016 10:40:12 +0200 Move the setting for the local variables "mask", "match" and "rc6_csl" behind the source code for a condition check by this function at the beginning. Signed-off-by: Markus Elfring --- drivers/media/rc/winbond-cir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index fd997f0..9d05e17 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -702,17 +702,17 @@ wbcir_shutdown(struct pnp_dev *device) bool do_wake = true; u8 match[11]; u8 mask[11]; - u8 rc6_csl = 0; + u8 rc6_csl; int i; - memset(match, 0, sizeof(match)); - memset(mask, 0, sizeof(mask)); - if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) { do_wake = false; goto finish; } + rc6_csl = 0; + memset(match, 0, sizeof(match)); + memset(mask, 0, sizeof(mask)); switch (protocol) { case IR_PROTOCOL_RC5: if (wake_sc > 0xFFF) {