mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
HID: wacom: Skip processing of touches with negative slot values
The `input_mt_get_slot_by_key` function may return a negative value if an error occurs (e.g. running out of slots). If this occurs we should really avoid reporting any data for the slot. Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
6ca2350e11
commit
7cc8524f65
1 changed files with 3 additions and 0 deletions
|
@ -2548,6 +2548,9 @@ static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac,
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
slot = input_mt_get_slot_by_key(input, hid_data->id);
|
slot = input_mt_get_slot_by_key(input, hid_data->id);
|
||||||
|
if (slot < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
input_mt_slot(input, slot);
|
input_mt_slot(input, slot);
|
||||||
input_mt_report_slot_state(input, MT_TOOL_FINGER, prox);
|
input_mt_report_slot_state(input, MT_TOOL_FINGER, prox);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue