phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
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: 53d2a715c2
("phy: Add Tegra XUSB pad controller support")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20221129111634.1547747-1-cuigaosheng1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
a50abe2e6d
commit
e024854048
@ -805,6 +805,7 @@ static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl,
|
||||
usb2->base.lane = usb2->base.ops->map(&usb2->base);
|
||||
if (IS_ERR(usb2->base.lane)) {
|
||||
err = PTR_ERR(usb2->base.lane);
|
||||
tegra_xusb_port_unregister(&usb2->base);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -871,6 +872,7 @@ static int tegra_xusb_add_ulpi_port(struct tegra_xusb_padctl *padctl,
|
||||
ulpi->base.lane = ulpi->base.ops->map(&ulpi->base);
|
||||
if (IS_ERR(ulpi->base.lane)) {
|
||||
err = PTR_ERR(ulpi->base.lane);
|
||||
tegra_xusb_port_unregister(&ulpi->base);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user