From: Yinhao Hu Date: Wed, 12 Apr 2023 05:58:52 +0000 (+0800) Subject: usb: chipidea: fix missing goto in `ci_hdrc_probe` X-Git-Tag: v6.1.28~165 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=17993a13b5f654070f63b3dd36099a94e52118d8;p=users%2Fdwmw2%2Flinux.git usb: chipidea: fix missing goto in `ci_hdrc_probe` [ Upstream commit d6f712f53b79f5017cdcefafb7a5aea9ec52da5d ] 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: 74475ede784d ("usb: chipidea: move PHY operation to core") Reviewed-by: Dongliang Mu Acked-by: Peter Chen Signed-off-by: Yinhao Hu Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 5abdc2b0f506d..71f172ecfaabc 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -1101,7 +1101,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;