summaryrefslogtreecommitdiffstats
path: root/patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch')
-rw-r--r--patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch b/patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch
new file mode 100644
index 0000000..0a4afb4
--- /dev/null
+++ b/patches/linux-3.1.10/0043-Fix-for-DWC-OTG-HCD-URB-Dequeue-has-NULL-URB-panic.-.patch
@@ -0,0 +1,29 @@
+From: popcornmix <popcornmix@gmail.com>
+Date: Tue, 15 May 2012 15:24:40 +0100
+Subject: [PATCH] Fix for DWC OTG HCD URB Dequeue has NULL URB panic. Thanks
+ Naren
+
+---
+ drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+index e7b90c8..2a3b689 100644
+--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+@@ -761,10 +761,12 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ dump_urb_info(urb, "urb_dequeue");
+ }
+ #endif
+- dwc_otg_hcd_urb_dequeue(dwc_otg_hcd, (dwc_otg_hcd_urb_t *)urb->hcpriv);
++ if(urb->hcpriv != NULL) {
++ dwc_otg_hcd_urb_dequeue(dwc_otg_hcd, (dwc_otg_hcd_urb_t *)urb->hcpriv);
+
+- dwc_free(urb->hcpriv);
+- urb->hcpriv = NULL;
++ urb->hcpriv = NULL;
++ dwc_free(urb->hcpriv);
++ }
+
+ /* Higher layer software sets URB status. */
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))