diff options
| author | Mario Limonciello <[email protected]> | 2025-06-27 19:23:20 +0000 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2025-06-27 19:24:54 +0000 |
| commit | 35ecea24b5ef7534b8c928bb9ddfa936bd2805ab (patch) | |
| tree | 2361145e2129c9ffd38457b1b9d185ba05d09ff5 | |
| parent | Input: apple_z2 - drop default ARCH_APPLE in Kconfig (diff) | |
| download | kernel-35ecea24b5ef7534b8c928bb9ddfa936bd2805ab.tar.gz kernel-35ecea24b5ef7534b8c928bb9ddfa936bd2805ab.zip | |
Input: xpad - adjust error handling for disconnect
When a device supporting xpad is disconnected it's expected that a
URB will fail to transmit.
Only show an error message when the error isn't -ENODEV.
Fixes: 7fc595f4c0263 ("Input: xpad - correctly handle concurrent LED and FF requests")
Signed-off-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
| -rw-r--r-- | drivers/input/joystick/xpad.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index c066a4da7c14..714a694fc0e5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1344,9 +1344,10 @@ static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad) usb_anchor_urb(xpad->irq_out, &xpad->irq_out_anchor); error = usb_submit_urb(xpad->irq_out, GFP_ATOMIC); if (error) { - dev_err(&xpad->intf->dev, - "%s - usb_submit_urb failed with result %d\n", - __func__, error); + if (error != -ENODEV) + dev_err(&xpad->intf->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, error); usb_unanchor_urb(xpad->irq_out); return -EIO; } |
