Commit 3c3fbd60 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: add better check to prevent oops in hcd_unlink_urb()

parent 37be0f5e
...@@ -1229,7 +1229,7 @@ static int hcd_unlink_urb (struct urb *urb) ...@@ -1229,7 +1229,7 @@ static int hcd_unlink_urb (struct urb *urb)
spin_unlock (&hcd_data_lock); spin_unlock (&hcd_data_lock);
spin_unlock_irqrestore (&urb->lock, flags); spin_unlock_irqrestore (&urb->lock, flags);
bye: bye:
if (retval && sys) if (retval && sys && sys->driver)
dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval); dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment