although we can not say it is surely a bug.
it is better to set urb-hcpriv = NULL, after finish calling urb_free_priv.
before kfree urb_priv, better to judge whether urb_priv == NULL, firstly.
Signed-off-by: Chen Gang gang.c...@asianux.com
---
drivers/usb/host/ohci-q.c |7 ++-
1
On Tue, 18 Dec 2012, Chen Gang wrote:
although we can not say it is surely a bug.
it is better to set urb-hcpriv = NULL, after finish calling urb_free_priv.
before kfree urb_priv, better to judge whether urb_priv == NULL, firstly.
Signed-off-by: Chen Gang gang.c...@asianux.com
---
于 2012年12月18日 23:17, Alan Stern 写道:
static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv)
{
- int last = urb_priv-length - 1;
+ int last;
+ if (!urb_priv)
+ return;
+
+ last = urb_priv-length - 1;
Please don't do this. If