Message ID | 20210304192134.520919-4-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 34348a8661e3cd67dcf6938f08c8bb77522301f7 |
Delegated to: | Jiri Kosina |
Headers | show |
Series | HID: lenovo: Mute LED handling fixes and improvements | 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: