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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250303110731.1491-1-vulab@iscas.ac.cn>
Date: Mon,  3 Mar 2025 19:07:31 +0800
From: Wentao Liang <vulab@...as.ac.cn>
To: pali@...nel.org,
	dmitry.torokhov@...il.com
Cc: erick.archer@...look.com,
	linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Wentao Liang <vulab@...as.ac.cn>
Subject: [PATCH] Input: alps - Propagate alps_passthrough_mode_v2() errors in alps_poll()

Add error handling to propagate alps_passthrough_mode_v2() failures
to the caller. When alps_passthrough_mode_v2() fails, immediately
return -1 to stop further processing and maintain consistent error
reporting.

Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
---
 drivers/input/mouse/alps.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 0728b5c08f02..557de3d0fce6 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1994,14 +1994,16 @@ static int alps_poll(struct psmouse *psmouse)
 	unsigned char buf[sizeof(psmouse->packet)];
 	bool poll_failed;
 
-	if (priv->flags & ALPS_PASS)
-		alps_passthrough_mode_v2(psmouse, true);
+	if ((priv->flags & ALPS_PASS) &&
+		alps_passthrough_mode_v2(psmouse, true))
+		return -1;
 
 	poll_failed = ps2_command(&psmouse->ps2dev, buf,
 				  PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0;
 
-	if (priv->flags & ALPS_PASS)
-		alps_passthrough_mode_v2(psmouse, false);
+	if ((priv->flags & ALPS_PASS) &&
+		alps_passthrough_mode_v2(psmouse, false))
+		return -1;
 
 	if (poll_failed || (buf[0] & priv->mask0) != priv->byte0)
 		return -1;
-- 
2.42.0.windows.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ