Skip to content

Commit 53bea86

Browse files
committed
Revert "Input: xpad - fix support for some third-party controllers"
This reverts commit db7220c because it causes crashes when trying to dereference xpad->dev->dev in xpad_probe() which has not been set up yet. Reported-by: [email protected] Reported-by: Dongliang Mu <[email protected]> Link: https://groups.google.com/g/syzkaller-bugs/c/iMhTgpGuIbM Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent c55d84f commit 53bea86

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

drivers/input/joystick/xpad.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ static const struct xpad_device {
264264
{ 0x0f0d, 0x0067, "HORIPAD ONE", 0, XTYPE_XBOXONE },
265265
{ 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
266266
{ 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
267-
{ 0x0f0d, 0x00dc, "HORIPAD FPS for Nintendo Switch", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
268267
{ 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX },
269268
{ 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
270269
{ 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
@@ -2032,28 +2031,6 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
20322031
goto err_free_in_urb;
20332032
}
20342033

2035-
if (xpad->xtype == XTYPE_XBOX360) {
2036-
/*
2037-
* Some third-party controllers Xbox 360-style controllers
2038-
* require this message to finish initialization.
2039-
*/
2040-
u8 dummy[20];
2041-
2042-
error = usb_control_msg_recv(udev, 0,
2043-
/* bRequest */ 0x01,
2044-
/* bmRequestType */
2045-
USB_TYPE_VENDOR | USB_DIR_IN |
2046-
USB_RECIP_INTERFACE,
2047-
/* wValue */ 0x100,
2048-
/* wIndex */ 0x00,
2049-
dummy, sizeof(dummy),
2050-
25, GFP_KERNEL);
2051-
if (error)
2052-
dev_warn(&xpad->dev->dev,
2053-
"unable to receive magic message: %d\n",
2054-
error);
2055-
}
2056-
20572034
ep_irq_in = ep_irq_out = NULL;
20582035

20592036
for (i = 0; i < 2; i++) {

0 commit comments

Comments
 (0)