Browse Source

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>
Chen Gang 12 years ago
parent
commit
ece1d77ed7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/usb/host/ohci-q.c

+ 1 - 0
drivers/usb/host/ohci-q.c

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