Skip to content

Commit 503bbde

Browse files
oneukumgregkh
authored andcommitted
usb: core: usb_submit_urb: downgrade type check
Checking for the endpoint type is no reason for a WARN, as that can cause a reboot. A driver not checking the endpoint type must not cause a reboot, as there is just no point in this. We cannot prevent a device from doing something incorrect as a reaction to a transfer. Hence warning for a mere assumption being wrong is not sensible. Signed-off-by: Oliver Neukum <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7bf742b commit 503bbde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/core/urb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
500500

501501
/* Check that the pipe's type matches the endpoint's type */
502502
if (usb_pipe_type_check(urb->dev, urb->pipe))
503-
dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
503+
dev_warn_once(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
504504
usb_pipetype(urb->pipe), pipetypes[xfertype]);
505505

506506
/* Check against a simple/standard policy */

0 commit comments

Comments
 (0)