Message ID | 20210404080432.4322-4-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 34348a8661e3cd67dcf6938f08c8bb77522301f7 |
Delegated to: | Jiri Kosina |
Headers | show |
Series | HID: lenovo: LED fixes and Thinkpad X1 Tablet kbd support | expand |
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c index ee175ab54281..b2596ed37880 100644 --- a/drivers/hid/hid-lenovo.c +++ b/drivers/hid/hid-lenovo.c @@ -508,6 +508,9 @@ static int lenovo_event_cptkbd(struct hid_device *hdev, static int lenovo_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { + if (!hid_get_drvdata(hdev)) + return 0; + switch (hdev->product) { case USB_DEVICE_ID_LENOVO_CUSBKBD: case USB_DEVICE_ID_LENOVO_CBTKBD: