]> git.itanic.dy.fi Git - linux-stable/commit
Input: aiptek - fix endpoint sanity check
authorJohan Hovold <johan@kernel.org>
Fri, 10 Jan 2020 19:59:32 +0000 (11:59 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:22 +0000 (19:03 +0100)
commit106028125d11cfa19a4bc7bee53bc43b9fa88009
tree778b79122e8549730a2093614a1f96a0c694e962
parent2cd104ae7ab56c3ec2c9fa08239392532bc43e72
Input: aiptek - fix endpoint sanity check

commit 3111491fca4f01764e0c158c5e0f7ced808eef51 upstream.

The driver was checking the number of endpoints of the first alternate
setting instead of the current one, something which could lead to the
driver binding to an invalid interface.

This in turn could cause the driver to misbehave or trigger a WARN() in
usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: 8e20cf2bce12 ("Input: aiptek - fix crash on detecting device without endpoints")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Vladis Dronov <vdronov@redhat.com>
Link: https://lore.kernel.org/r/20191210113737.4016-3-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/input/tablet/aiptek.c