Commit 0376aa62 authored by Wang Yufen's avatar Wang Yufen Committed by Greg Kroah-Hartman

usb: musb: fix error return code in da8xx_musb_init()

Fix to return a negative error code -ENODEV instead of 0 as before
commit 09721ba6 ("usb: musb: da8xx: Call earlier
clk_prepare_enable()") did.
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Link: https://lore.kernel.org/r/1669473332-14165-1-git-send-email-wangyufen@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b566d388
......@@ -368,8 +368,10 @@ static int da8xx_musb_init(struct musb *musb)
/* Returns zero if e.g. not clocked */
rev = musb_readl(reg_base, DA8XX_USB_REVISION_REG);
if (!rev)
if (!rev) {
ret = -ENODEV;
goto fail;
}
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
if (IS_ERR_OR_NULL(musb->xceiv)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment