USB: ohci: set urb->hcpriv = NULL immediately, after free it

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>
This commit is contained in:
Chen Gang 2012-12-19 09:18:57 +08:00 committed by Greg Kroah-Hartman
parent 2c449e3801
commit ece1d77ed7

View File

@ -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;