Commit 35ecea24 authored by Mario Limonciello's avatar Mario Limonciello Committed by Dmitry Torokhov
Browse files

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: 7fc595f4 ("Input: xpad - correctly handle concurrent LED and FF requests")
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250609014718.236827-2-superm1@kernel.org


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f4b048a6
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1344,6 +1344,7 @@ 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) {
			if (error != -ENODEV)
				dev_err(&xpad->intf->dev,
					"%s - usb_submit_urb failed with result %d\n",
					__func__, error);