From: Hans de Goede Date: Sat, 2 Apr 2016 18:46:10 +0000 (+0200) Subject: musb: Properly call musb_stop() on probe failure X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bf313230642ca6ce1e5cb67d49f6cc72a6d752ae;p=project%2Fbcm63xx%2Fu-boot.git musb: Properly call musb_stop() on probe failure musb_lowlevelinit(): if no device is plugged in / detected call musb_stop() to undo the preceding musb_start() call. Signed-off-by: Hans de Goede --- diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 233a0e4a5e..6ce528c81e 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -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;