Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chen Gang and committed by
Greg Kroah-Hartman
ece1d77e 2c449e38

+1
+1
drivers/usb/host/ohci-q.c
··· 44 44 // ASSERT (urb->hcpriv != 0); 45 45 46 46 urb_free_priv (ohci, urb->hcpriv); 47 + urb->hcpriv = NULL; 47 48 if (likely(status == -EINPROGRESS)) 48 49 status = 0; 49 50