diff mbox series

[SRU,OEM-OSP1-B,1/2] Revert "UBUNTU: SAUCE: Input: i8042 - Fix the selftest retry logic"

Message ID 20200316092747.301760-2-vicamo.yang@canonical.com
State Accepted
Headers show
Series All PS/2 ports on PS/2 Serial add-in bracket are not working after S3 | expand

Commit Message

You-Sheng Yang March 16, 2020, 9:27 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1866734

This reverts commit 0aa61f18ea08137125fc7453b48526371184699e.

Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/input/serio/i8042.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index c64f43ebe56a..1e29408491eb 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -937,9 +937,10 @@  static int i8042_controller_selftest(void)
 	 */
 	do {
 
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			pr_info("i8042 controller selftest timeout (%d/5)\n",
-			        i+1);
+		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
+			pr_info("i8042 controller selftest timeout\n");
+			return -ENODEV;
+		}
 
 		if (param == I8042_RET_CTL_TEST)
 			return 0;
@@ -947,9 +948,7 @@  static int i8042_controller_selftest(void)
 		dbg("i8042 controller selftest: %#x != %#x\n",
 		    param, I8042_RET_CTL_TEST);
 		msleep(50);
-	} while (++i < 5);
-	if (i == 5)
-		return -ENODEV;
+	} while (i++ < 5);
 
 #ifdef CONFIG_X86
 	/*