From: Chen Gang Date: Wed, 19 Dec 2012 01:18:57 +0000 (+0800) Subject: USB: ohci: set urb->hcpriv = NULL immediately, after free it X-Git-Tag: firefly_0821_release~3680^2~1079^2~72 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ece1d77ed73b335319725f1d5ffa72ca3fa9b05c;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index 7482cfbe8c5e..88731b7c5f42 100644 --- a/drivers/usb/host/ohci-q.c +++ b/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;