Skip to content

Commit 93a2207

Browse files
committed
HID: holtek: fix mouse probing
An overlook from the previous commit: we don't even parse or start the device, meaning that the device is not presented to user space. Fixes: 9302095 ("HID: check for valid USB device for many HID drivers") Cc: stable@vger.kernel.org Link: https://bugs.archlinux.org/task/73048 Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341 Link: https://lore.kernel.org/r/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
1 parent 14902f8 commit 93a2207

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

drivers/hid/hid-holtek-mouse.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
6565
static int holtek_mouse_probe(struct hid_device *hdev,
6666
const struct hid_device_id *id)
6767
{
68+
int ret;
69+
6870
if (!hid_is_usb(hdev))
6971
return -EINVAL;
72+
73+
ret = hid_parse(hdev);
74+
if (ret) {
75+
hid_err(hdev, "hid parse failed: %d\n", ret);
76+
return ret;
77+
}
78+
79+
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
80+
if (ret) {
81+
hid_err(hdev, "hw start failed: %d\n", ret);
82+
return ret;
83+
}
84+
7085
return 0;
7186
}
7287

0 commit comments

Comments
 (0)