summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-q.c
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2012-12-19 02:18:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-12 01:03:38 +0100
commitece1d77ed73b335319725f1d5ffa72ca3fa9b05c (patch)
treee6caafbfa8110e9799e550c4c0afc1a516471e6b /drivers/usb/host/ohci-q.c
parenttools/usb: remove unneeded 'continue' and simplify condition (diff)
downloadlinux-ece1d77ed73b335319725f1d5ffa72ca3fa9b05c.tar.xz
linux-ece1d77ed73b335319725f1d5ffa72ca3fa9b05c.zip
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>
Diffstat (limited to 'drivers/usb/host/ohci-q.c')
-rw-r--r--drivers/usb/host/ohci-q.c1
1 files changed, 1 insertions, 0 deletions
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;