Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9aa795a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[PATCH] USB: add might_sleep() to usb_unlink_urb() to warn developers

parent 682d4c80
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -468,6 +468,7 @@ int usb_unlink_urb(struct urb *urb)
 */
 */
void usb_kill_urb(struct urb *urb)
void usb_kill_urb(struct urb *urb)
{
{
	might_sleep();
	if (!(urb && urb->dev && urb->dev->bus && urb->dev->bus->op))
	if (!(urb && urb->dev && urb->dev->bus && urb->dev->bus->op))
		return;
		return;
	spin_lock_irq(&urb->lock);
	spin_lock_irq(&urb->lock);