mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
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>
This commit is contained in:
parent
38b4a3e143
commit
bf31323064
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue