summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-05-04 22:26:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-10 16:17:57 +0200
commitd9ff1096a840dddea3d5cfa2149ff7da9f499fb2 (patch)
tree8c879fe83c76efb6332d1d33efb7dfa34182858e /drivers/usb
parentusb: typec: tcpm: Fix wrong handling for Not_Supported in VDM AMS (diff)
downloadlinux-d9ff1096a840dddea3d5cfa2149ff7da9f499fb2.tar.xz
linux-d9ff1096a840dddea3d5cfa2149ff7da9f499fb2.zip
usb: musb: Fix an error message
'ret' is known to be 0 here. Initialize 'ret' with the expected error code before using it. Fixes: 0990366bab3c ("usb: musb: Add support for MediaTek musb controller") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/69f514dc7134e3c917cad208e73cc650cb9e2bd6.1620159879.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/mediatek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/mediatek.c b/drivers/usb/musb/mediatek.c
index eebeadd26946..6b92d037d8fc 100644
--- a/drivers/usb/musb/mediatek.c
+++ b/drivers/usb/musb/mediatek.c
@@ -518,8 +518,8 @@ static int mtk_musb_probe(struct platform_device *pdev)
glue->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
if (IS_ERR(glue->xceiv)) {
- dev_err(dev, "fail to getting usb-phy %d\n", ret);
ret = PTR_ERR(glue->xceiv);
+ dev_err(dev, "fail to getting usb-phy %d\n", ret);
goto err_unregister_usb_phy;
}