mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
usb: musb: fix error return code in da8xx_musb_init()
Fix to return a negative error code -ENODEV instead of 0 as before commit 09721ba6daa1 ("usb: musb: da8xx: Call earlier clk_prepare_enable()") did. Signed-off-by: Wang Yufen <wangyufen@huawei.com> Link: https://lore.kernel.org/r/1669473332-14165-1-git-send-email-wangyufen@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b566d38857
commit
0376aa6232
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user