]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: pidff: Fix set_device_control()
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Tue, 25 Feb 2025 22:30:04 +0000 (23:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:31 +0000 (10:15 +0200)
commitbdbc38bd12eb36bbbcce4f013879c1755c9a9084
treed057154a1622c870ba1c22ab0e34bb3ba27cf82a
parent1565ead12f5c581550ef07c30ee33fe7022f9859
HID: pidff: Fix set_device_control()

[ Upstream commit e2fa0bdf08a70623f24ed52f2037a330999d9800 ]

As the search for Device Control report is permissive, make sure the
desired field was actually found, before trying to set it.

Fix bitmask clearing as it was erronously using index instead of
index - 1 (HID arrays index is 1-based).

Add last two missing Device Control usages to the defined array.
PID_PAUSE and PID_CONTINUE.

Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/usbhid/hid-pidff.c