Skip to content

Commit

Permalink
USB: ohci: set urb->hcpriv = NULL immediately, after free it
Browse files Browse the repository at this point in the history
although we can not say it is surely a bug.
it is better to set urb->hcpriv = NULL, after finish calling
urb_free_priv.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Chen Gang authored and Greg Kroah-Hartman committed Jan 12, 2013
1 parent 2c449e3 commit ece1d77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/host/ohci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ __acquires(ohci->lock)
// ASSERT (urb->hcpriv != 0);

urb_free_priv (ohci, urb->hcpriv);
urb->hcpriv = NULL;
if (likely(status == -EINPROGRESS))
status = 0;

Expand Down

0 comments on commit ece1d77

Please sign in to comment.