mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
Input: sur40 - convert le16 to cpu before use
Smatch found this issue: drivers/input/touchscreen/sur40.c:424:55: warning: incorrect type in argument 2 (different base types) drivers/input/touchscreen/sur40.c:424:55: expected int key drivers/input/touchscreen/sur40.c:424:55: got restricted __le16 [usertype] blob_id Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20240410-smatch-v1-6-785d009a852b@chromium.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
8984e0b569
commit
ba2ec9c4f0
|
|
@ -421,7 +421,7 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input)
|
|||
if (blob->type != SUR40_TOUCH)
|
||||
return;
|
||||
|
||||
slotnum = input_mt_get_slot_by_key(input, blob->blob_id);
|
||||
slotnum = input_mt_get_slot_by_key(input, le16_to_cpu(blob->blob_id));
|
||||
if (slotnum < 0 || slotnum >= MAX_CONTACTS)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user