Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efb04259 authored by Pablo Ceballos's avatar Pablo Ceballos Committed by Greg Kroah-Hartman
Browse files

HID: hid-sensor-hub: Fix issue with devices with no report ID



[ Upstream commit 34a9fa2025d9d3177c99351c7aaf256c5f50691f ]

Some HID devices don't use a report ID because they only have a single
report. In those cases, the report ID in struct hid_report will be zero
and the data for the report will start at the first byte, so don't skip
over the first byte.

Signed-off-by: default avatarPablo Ceballos <pceballos@google.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 94b6e6ee
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -496,6 +496,7 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
		return 1;

	ptr = raw_data;
	if (report->id)
		ptr++; /* Skip report id */

	spin_lock_irqsave(&pdata->lock, flags);