* [PATCH] HID: wacom: fix an Oops caused by wacom_wac_finger_count_touches
@ 2015-05-20 0:42 Ping Cheng
2015-05-20 10:05 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Ping Cheng @ 2015-05-20 0:42 UTC (permalink / raw)
To: jkosina; +Cc: linux-input, tasos, Ping Cheng
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 <tasos@tasossah.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
---
Hi Jiri, this patch is based on for-4.1/wacom. The issue was
initially introduced in 4.1.
---
drivers/hid/wacom_wac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 69c7df7..1cd80d2 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1072,6 +1072,9 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
int count = 0;
int i;
+ if (!touch_max)
+ return 0;
+
/* non-HID_GENERIC single touch input doesn't call this routine */
if ((touch_max == 1) && (wacom->features.type == HID_GENERIC))
return wacom->hid_data.tipswitch &&
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: wacom: fix an Oops caused by wacom_wac_finger_count_touches
2015-05-20 0:42 [PATCH] HID: wacom: fix an Oops caused by wacom_wac_finger_count_touches Ping Cheng
@ 2015-05-20 10:05 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2015-05-20 10:05 UTC (permalink / raw)
To: Ping Cheng; +Cc: linux-input, tasos, Ping Cheng
On Tue, 19 May 2015, Ping Cheng wrote:
> 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 <tasos@tasossah.com>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> ---
> Hi Jiri, this patch is based on for-4.1/wacom. The issue was
> initially introduced in 4.1.
Thanks. This is now applied to for-4.1/upstream-fixes, and this branch
will be sent to Linus for pulling later today.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-20 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 0:42 [PATCH] HID: wacom: fix an Oops caused by wacom_wac_finger_count_touches Ping Cheng
2015-05-20 10:05 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).