mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-24 19:10:26 +00:00
HID: simplify snto32()
[ Upstream commitae9b956cb2] 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:a6b87bfc2a("HID: core: Harden s32ton() against conversion to 0 bits") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a905edfec7
commit
7a7ba33110
1 changed files with 2 additions and 9 deletions
Loading…
Add table
Add a link
Reference in a new issue