HID: picolcd: be more verbose when reporting report size error
authorJiri Kosina <jkosina@suse.cz>
Wed, 27 Aug 2014 21:27:10 +0000 (23:27 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 27 Aug 2014 21:27:10 +0000 (23:27 +0200)
picolcd device is not expected to send any report with size larger than
64 bytes.

If this impossible event happens (sic!), print also a report ID to allow
for easier debugging.

Suggested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd_core.c

index 020df3c2e8b42717c62bbe0470aa47845535e4a5..c1b29a9eb41ab824fd643e920b9a16f30af29186 100644 (file)
@@ -351,8 +351,8 @@ static int picolcd_raw_event(struct hid_device *hdev,
                return 1;
 
        if (size > 64) {
-               hid_warn(hdev, "invalid size value (%d) for picolcd raw event\n",
-                               size);
+               hid_warn(hdev, "invalid size value (%d) for picolcd raw event (%d)\n",
+                               size, report->id);
                return 0;
        }