Skip to content

Commit

Permalink
usb: musb: Fix an error message
Browse files Browse the repository at this point in the history
[ Upstream commit d9ff109 ]

'ret' is known to be 0 here.
Initialize 'ret' with the expected error code before using it.

Fixes: 0990366 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed May 19, 2021
1 parent 4d82702 commit 8758cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/musb/mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8758cf9

Please sign in to comment.