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:Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20241003144656.3786064-1-dmitry.torokhov@gmail.com Signed-off-by:
Benjamin Tissoires <bentiss@kernel.org> Stable-dep-of: a6b87bfc ("HID: core: Harden s32ton() against conversion to 0 bits") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading