usb: chipidea: fix missing goto in `ci_hdrc_probe`

[ Upstream commit d6f712f53b ]

From the comment of ci_usb_phy_init, it returns an error code if
usb_phy_init has failed, and it should do some clean up, not just
return directly.

Fix this by goto the error handling.

Fixes: 74475ede78 ("usb: chipidea: move PHY operation to core")
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Yinhao Hu <dddddd@hust.edu.cn>
Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Yinhao Hu 2023-04-12 13:58:52 +08:00 committed by Greg Kroah-Hartman
parent 6d4325ebd8
commit 6b0d399dac
1 changed files with 1 additions and 1 deletions

View File

@ -1098,7 +1098,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
ret = ci_usb_phy_init(ci);
if (ret) {
dev_err(dev, "unable to init phy: %d\n", ret);
return ret;
goto ulpi_exit;
}
ci->hw_bank.phys = res->start;