summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorCameron Gutman <aicommander@gmail.com>2016-06-23 10:24:42 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-06-23 10:28:28 -0700
commitc7f1429389ec1aa25e042bb13451385fbb596f8c (patch)
tree9875a48717fc9974878889d0916ccd0630e4cbf6 /block
parent30172936eefb70c27fade1bc912a25fc90827b76 (diff)
Input: xpad - fix oops when attaching an unknown Xbox One gamepad
Xbox One controllers have multiple interfaces which all have the same class, subclass, and protocol. One of the these interfaces has only a single endpoint. When Xpad attempts to bind to this interface, it causes an oops when trying initialize the output URB by trying to access the second endpoint's descriptor. This situation was avoided for known Xbox One devices by checking the XTYPE constant associated with the VID and PID tuple. However, this breaks when new or previously unknown Xbox One controllers are attached to the system. This change addresses the problem by deriving the XTYPE for Xbox One controllers based on the interface protocol before checking the interface number. Fixes: 1a48ff81b391 ("Input: xpad - add support for Xbox One controllers") Signed-off-by: Cameron Gutman <aicommander@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions