Input: xpad - validate USB endpoint type during probe
commitac8f836e6d6d200a23849c7642a709e80d03c880
authorCameron Gutman <aicommander@gmail.com>
Tue, 12 Sep 2017 18:27:44 +0000 (12 11:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Dec 2018 08:44:23 +0000 (1 09:44 +0100)
tree649ba3dbea7cc23a049b8d5c38566b336b8dc768
parent7d6d5fc8b6575080970416c0a9ae1f055fb0ffdd
Input: xpad - validate USB endpoint type during probe

[ Upstream commit 122d6a347329818419b032c5a1776e6b3866d9b9 ]

We should only see devices with interrupt endpoints. Ignore any other
endpoints that we find, so we don't send try to send them interrupt URBs
and trigger a WARN down in the USB stack.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: <stable@vger.kernel.org> # c01b5e7464f0 Input: xpad - don't depend on endpoint order
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/joystick/xpad.c