]> git.baikalelectronics.ru Git - kernel.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)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Oct 2019 14:18:35 +0000 (16:18 +0200)
commit035f3edc65ea510bf2eda3040373ec1e290f1fc6
treef401ae7633a0a0c9b55a74dbd8b8fb37130b9f8c
parent8d48b303a48105fa27ae5427d758f64706310946
HID: fix error message in hid_open_report()

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.

Cc: stable@vger.kernel.org
Fixes: abbc85ba28a7 ("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>
drivers/hid/hid-core.c