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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1650619544-3741-1-git-send-email-baihaowen@meizu.com>
Date:   Fri, 22 Apr 2022 17:25:43 +0800
From:   Haowen Bai <baihaowen@...zu.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:     Haowen Bai <baihaowen@...zu.com>, <linux-input@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] Input: Remove duplicated condition

Remove the duplicated condition, and make code clear.

Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
 drivers/input/mouse/hgpk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 4dc441309aac..7c6b669b687f 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -611,9 +611,7 @@ static int hgpk_reset_device(struct psmouse *psmouse, bool recalibrate)
 
 		/* send the recalibrate request */
 		if (ps2_command(ps2dev, NULL, 0xf5) ||
-		    ps2_command(ps2dev, NULL, 0xf5) ||
-		    ps2_command(ps2dev, NULL, 0xe6) ||
-		    ps2_command(ps2dev, NULL, 0xf5)) {
+		    ps2_command(ps2dev, NULL, 0xe6)) {
 			return -1;
 		}
 
@@ -728,7 +726,6 @@ static int hgpk_toggle_powersave(struct psmouse *psmouse, int enable)
 		psmouse_dbg(psmouse, "Powering off touchpad.\n");
 
 		if (ps2_command(ps2dev, NULL, 0xec) ||
-		    ps2_command(ps2dev, NULL, 0xec) ||
 		    ps2_command(ps2dev, NULL, 0xea)) {
 			return -1;
 		}
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ