hog-lib: Check if Report ID is set before prepending it
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 20 Apr 2022 20:08:59 +0000 (13:08 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit74564c2fe0089f293944202fb7d335dca7a4e087
treede089101b65f02c196d738785d3a43437cef63e5
parent39fe7f1d9d7e654ba693b7207571f74c139589cb
hog-lib: Check if Report ID is set before prepending it

Before prepending the Report ID check if it is non-zero:

BLUETOOTH SPECIFICATION Page 16 of 26
HID Service Specification

Report ID shall be nonzero in a Report Reference characteristic
descriptor where there is more than one instance of the Report
characteristic for any given Report Type.

Fixes: https://www.spinics.net/lists/linux-bluetooth/msg97262.html
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/input/hog-lib.c