DORMANTno replies

[PATCH] HID: kye: fix inverted Manticore open/close condition

From: Oscar Priego Verdugo <hidden>
Date: 2026-09-11 10:55:14
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

The Manticore workaround is intended to open each HID interface once and
immediately close it, which is required for the keyboard to become fully
functional.

hid_hw_open() returns zero on success, so the current condition is
inverted: successful opens are left outstanding, while hid_hw_close() is
called after a failed open.

Negate the condition so the interface is closed only after a successful
open. This restores the sequence intended by the original workaround while
preserving its best-effort behavior when opening fails.

Fixes: 8a396321e210 ("HID: kye: fix unresponsive keyboard")
Signed-off-by: Oscar Priego Verdugo <redacted>
---
 drivers/hid/hid-kye.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index bd96bfa7af70..ed1588e2bfb3 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -594,7 +594,7 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
 		 * The manticore keyboard needs to have all the interfaces
 		 * opened at least once to be fully functional.
 		 */
-		if (hid_hw_open(hdev))
+		if (!hid_hw_open(hdev))
 			hid_hw_close(hdev);
 		break;
 	case USB_DEVICE_ID_KYE_EASYPEN_M406:
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help