Skip to content

Commit ba2ec9c

Browse files
ribaldadtor
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 8984e0b commit ba2ec9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/sur40.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input)
421421
if (blob->type != SUR40_TOUCH)
422422
return;
423423

424-
slotnum = input_mt_get_slot_by_key(input, blob->blob_id);
424+
slotnum = input_mt_get_slot_by_key(input, le16_to_cpu(blob->blob_id));
425425
if (slotnum < 0 || slotnum >= MAX_CONTACTS)
426426
return;
427427

0 commit comments

Comments
 (0)