diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-04-02 20:46:10 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2016-04-10 17:18:43 +0200 |
commit | bf313230642ca6ce1e5cb67d49f6cc72a6d752ae (patch) | |
tree | 4d404ef36d45cf9659e990768d8be8f4bdd61fd0 /drivers/usb | |
parent | 38b4a3e14397582549b3bb1b301fd9b5c7fc89d2 (diff) | |
download | u-boot-imx-bf313230642ca6ce1e5cb67d49f6cc72a6d752ae.zip u-boot-imx-bf313230642ca6ce1e5cb67d49f6cc72a6d752ae.tar.gz u-boot-imx-bf313230642ca6ce1e5cb67d49f6cc72a6d752ae.tar.bz2 |
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 <hdegoede@redhat.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb-new/musb_uboot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 233a0e4..6ce528c 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; |