Skip to content

Commit

Permalink
HID: picolcd: be more verbose when reporting report size error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Aug 27, 2014
1 parent ff0c57a commit 604b607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-picolcd_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 604b607

Please sign in to comment.