]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: fix error message in hid_open_report()
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Fri, 23 Aug 2019 19:15:27 +0000 (21:15 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Dec 2019 15:57:52 +0000 (15:57 +0000)
commit1720c6f9aefcab68a4e7c058db44127a646ca9bf
treee374db3ee1b3271a7cbce697153061d7831db81e
parent584df56f99dd94362a24c4ed710239b8965d8791
HID: fix error message in hid_open_report()

commit b3a81c777dcb093020680490ab970d85e2f6f04f upstream.

On HID report descriptor parsing error the code displays bogus
pointer instead of error offset (subtracts start=NULL from end).
Make the message more useful by displaying correct error offset
and include total buffer size for reference.

This was carried over from ancient times - "Fixed" commit just
promoted the message from DEBUG to ERROR.

Fixes: 8c3d52fc393b ("HID: make parser more verbose about parsing errors by default")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hid/hid-core.c