Skip to content

Commit 9cb0735

Browse files
gscuismb49
authored andcommitted
phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
BugLink: https://bugs.launchpad.net/bugs/2025067 [ Upstream commit e024854 ] The tegra_xusb_port_unregister should be called when usb2_port and ulpi_port map fails in tegra_xusb_add_usb2_port() or in tegra_xusb_add_ulpi_port(), fix it. Fixes: 53d2a71 ("phy: Add Tegra XUSB pad controller support") Signed-off-by: Gaosheng Cui <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent fac1e24 commit 9cb0735

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/phy/tegra/xusb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl,
782782
usb2->base.lane = usb2->base.ops->map(&usb2->base);
783783
if (IS_ERR(usb2->base.lane)) {
784784
err = PTR_ERR(usb2->base.lane);
785+
tegra_xusb_port_unregister(&usb2->base);
785786
goto out;
786787
}
787788

@@ -848,6 +849,7 @@ static int tegra_xusb_add_ulpi_port(struct tegra_xusb_padctl *padctl,
848849
ulpi->base.lane = ulpi->base.ops->map(&ulpi->base);
849850
if (IS_ERR(ulpi->base.lane)) {
850851
err = PTR_ERR(ulpi->base.lane);
852+
tegra_xusb_port_unregister(&ulpi->base);
851853
goto out;
852854
}
853855

0 commit comments

Comments
 (0)