]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/ehci-hcd.c
ehci-hcd: Cleanup memory resources when ehci_halt fails
[karo-tx-linux.git] / drivers / usb / host / ehci-hcd.c
index 48c92bf78bd065ecc21bdda8ee5f50f426f25fda..00e77cc91053a48cf6b9ea1e5f2d5bd49b468403 100644 (file)
@@ -98,7 +98,7 @@ module_param (park, uint, S_IRUGO);
 MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
 
 /* for flakey hardware, ignore overcurrent indicators */
-static bool ignore_oc = 0;
+static bool ignore_oc;
 module_param (ignore_oc, bool, S_IRUGO);
 MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
 
@@ -675,8 +675,10 @@ int ehci_setup(struct usb_hcd *hcd)
                return retval;
 
        retval = ehci_halt(ehci);
-       if (retval)
+       if (retval) {
+               ehci_mem_cleanup(ehci);
                return retval;
+       }
 
        ehci_reset(ehci);