Skip to content

Commit 26ba61f

Browse files
PinglinuxJiri Kosina
authored andcommitted
HID: wacom: fix an Oops caused by wacom_wac_finger_count_touches
We assumed all touch interfaces report touch data. But, Bamboo and Intuos non-touch devices report express keys on touch interface. We need to check touch_max before counting touches. Reported-by: Tasos Sahanidis <[email protected]> Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 849eca7 commit 26ba61f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/hid/wacom_wac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,9 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
10721072
int count = 0;
10731073
int i;
10741074

1075+
if (!touch_max)
1076+
return 0;
1077+
10751078
/* non-HID_GENERIC single touch input doesn't call this routine */
10761079
if ((touch_max == 1) && (wacom->features.type == HID_GENERIC))
10771080
return wacom->hid_data.tipswitch &&

0 commit comments

Comments
 (0)