Input: xpad - return errors from xpad_try_sending_next_out_packet() up
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 27 Jun 2025 19:23:44 +0000 (12:23 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jun 2025 19:24:55 +0000 (12:24 -0700)
Not all errors that occur in xpad_try_sending_next_out_packet() are
IO errors. Pass up the error code to the caller so that it can
decide what to do.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250609014718.236827-3-superm1@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c

index 714a694fc0e5e791e80943461bc68bf0b6a2d58b..e0374111d0174186a65efd647b41cba4c691af2e 100644 (file)
@@ -1349,7 +1349,7 @@ static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad)
                                        "%s - usb_submit_urb failed with result %d\n",
                                        __func__, error);
                        usb_unanchor_urb(xpad->irq_out);
-                       return -EIO;
+                       return error;
                }
 
                xpad->irq_out_active = true;