musb: Properly call musb_stop() on probe failure
[oweals/u-boot.git] / drivers / usb / musb-new / musb_uboot.c
index 233a0e4a5e297363532c6c2bc338fe2598094581..6ce528c81ee02ed493579f91525f3f80ccf9dd7c 100644 (file)
@@ -237,8 +237,10 @@ int musb_lowlevel_init(struct musb_host_data *host)
                if (musb_readb(mbase, MUSB_DEVCTL) & MUSB_DEVCTL_HM)
                        break;
        } while (get_timer(0) < timeout);
-       if (get_timer(0) >= timeout)
+       if (get_timer(0) >= timeout) {
+               musb_stop(host->host);
                return -ENODEV;
+       }
 
        _musb_reset_root_port(host, NULL);
        host->host->is_active = 1;