diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index c7075d2b0786efc8d55da550a27dd2fd16f3b893..8551693d645fc602fe5f3bf3ccd1352fefc439c2 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1825,6 +1825,9 @@ int hid_check_keys_pressed(struct hid_device *hid) struct hid_input *hidinput; int i; + if (!(hid->claimed & HID_CLAIMED_INPUT)) + return 0; + list_for_each_entry(hidinput, &hid->inputs, list) { for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++) if (hidinput->input->key[i])