diff options
Diffstat (limited to 'drivers/hid/hid-core.c')
| -rw-r--r-- | drivers/hid/hid-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index ba1c3644e6ac..de8220c3fb5f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
| @@ -1373,8 +1373,10 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) | |||
| 1373 | if ((connect_mask & HID_CONNECT_HIDRAW) && !hidraw_connect(hdev)) | 1373 | if ((connect_mask & HID_CONNECT_HIDRAW) && !hidraw_connect(hdev)) |
| 1374 | hdev->claimed |= HID_CLAIMED_HIDRAW; | 1374 | hdev->claimed |= HID_CLAIMED_HIDRAW; |
| 1375 | 1375 | ||
| 1376 | if (!hdev->claimed) { | 1376 | /* Drivers with the ->raw_event callback set are not required to connect |
| 1377 | hid_err(hdev, "claimed by neither input, hiddev nor hidraw\n"); | 1377 | * to any other listener. */ |
| 1378 | if (!hdev->claimed && !hdev->driver->raw_event) { | ||
| 1379 | hid_err(hdev, "device has no listeners, quitting\n"); | ||
| 1378 | return -ENODEV; | 1380 | return -ENODEV; |
| 1379 | } | 1381 | } |
| 1380 | 1382 | ||
