lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <285954ec-280f-8a5a-5189-eb2471b4339c@users.sourceforge.net>
Date:   Fri, 14 Oct 2016 13:43:09 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-media@...r.kernel.org,
        David Härdeman <david@...deman.nu>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sean Young <sean@...s.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 3/5] [media] winbond-cir: Move assignments for three variables
 in wbcir_shutdown()

From: Markus Elfring <elfring@...rs.sourceforge.net>
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 <elfring@...rs.sourceforge.net>
---
 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) {
-- 
2.10.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ