Commit 7a7ba331 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman
Browse files

HID: simplify snto32()



[ Upstream commit ae9b956c ]

snto32() does exactly what sign_extend32() does, but handles
potentially malformed data coming from the device. Keep the checks,
but then call sign_extend32() to perform the actual conversion.

Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20241003144656.3786064-1-dmitry.torokhov@gmail.com


Signed-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
Stable-dep-of: a6b87bfc ("HID: core: Harden s32ton() against conversion to 0 bits")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a905edfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment