提交 bf313230 编写于 作者: H Hans de Goede 提交者: Marek Vasut

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: NHans de Goede <hdegoede@redhat.com>
上级 38b4a3e1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册