USB: ohci: set urb->hcpriv = NULL immediately, after free it
authorChen Gang <gang.chen@asianux.com>
Wed, 19 Dec 2012 01:18:57 +0000 (09:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jan 2013 00:03:38 +0000 (16:03 -0800)
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>
drivers/usb/host/ohci-q.c

index 7482cfbe8c5e48a29b1b865a9d799b49043e5bc6..88731b7c5f4290332409e4fca11ded93051c639c 100644 (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;