]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 13 Nov 2019 23:47:34 +0000 (18:47 -0500)
commit7509457ee72b5782e6287c7168a93ee7eb156db2
tree34e6d307eb3d7c0018fd04f4496f98afcd08418c
parent29d944cdcc6a6d4c614edfab52f715760511ba59
HID: fix error message in hid_open_report()

BugLink: https://bugs.launchpad.net/bugs/1852492
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.

Cc: stable@vger.kernel.org
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hid/hid-core.c