diff mbox series

Input: Remove duplicated condition

Message ID 1650619544-3741-1-git-send-email-baihaowen@meizu.com (mailing list archive)
State New
Headers show
Series Input: Remove duplicated condition | expand

Commit Message

baihaowen April 22, 2022, 9:25 a.m. UTC
Remove the duplicated condition, and make code clear.

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

Patch

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;
 		}