Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: remove unneeded WARN_ON

This patch (as883) removes an out-of-date WARN_ON from the main HCD
endpoint-disable routine. The warning is triggered whenever an
endpoint is disabled while the root hub is suspended. In the past
that may not have been legal, but it definitely is legal now. Merely
unbinding a USB driver will do it.

Furthermore, I've never seen any occurrences of this warning that
really did signal an actual bug or error condition. At this point it
has outlived its purpose.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

authored by

Alan Stern and committed by
Greg Kroah-Hartman
bf87ce5a ef7f6c70

-4
-4
drivers/usb/core/hcd.c
··· 1175 1175 struct urb *urb; 1176 1176 1177 1177 hcd = bus_to_hcd(udev->bus); 1178 - 1179 - WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT && 1180 - udev->state != USB_STATE_NOTATTACHED); 1181 - 1182 1178 local_irq_disable (); 1183 1179 1184 1180 /* ep is already gone from udev->ep_{in,out}[]; no more submits */