[PATCH] HID: kye: fix inverted Manticore open/close condition
From: Oscar Priego Verdugo
Date: Fri Sep 11 2026 - 06:59:39 EST
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 <oscar.priegov@xxxxxxxxx>
---
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