diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
commit | 09eb3ad55fef8d62edb74d5fe3a6720b6b467463 (patch) | |
tree | ea7effcf055b12be234d0992110e464aa307520d /drivers/hid/hid-holtek-kbd.c | |
parent | 60bf9b33c82c0e040a98272d7ff4f5a52e7469d6 (diff) | |
parent | 94185adbfad56815c2c8401e16d81bdb74a79201 (diff) | |
download | linux-09eb3ad55fef8d62edb74d5fe3a6720b6b467463.tar.xz |
Merge branch 'irq/urgent' into irq/msi
to pick up the PCI/MSI-x fixes.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/hid/hid-holtek-kbd.c')
-rw-r--r-- | drivers/hid/hid-holtek-kbd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/hid/hid-holtek-kbd.c b/drivers/hid/hid-holtek-kbd.c index 0a38e8e9bc78..403506b9697e 100644 --- a/drivers/hid/hid-holtek-kbd.c +++ b/drivers/hid/hid-holtek-kbd.c @@ -140,12 +140,17 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type, static int holtek_kbd_probe(struct hid_device *hdev, const struct hid_device_id *id) { - struct usb_interface *intf = to_usb_interface(hdev->dev.parent); - int ret = hid_parse(hdev); + struct usb_interface *intf; + int ret; + + if (!hid_is_usb(hdev)) + return -EINVAL; + ret = hid_parse(hdev); if (!ret) ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); + intf = to_usb_interface(hdev->dev.parent); if (!ret && intf->cur_altsetting->desc.bInterfaceNumber == 1) { struct hid_input *hidinput; list_for_each_entry(hidinput, &hdev->inputs, list) { |