phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
authorGaosheng Cui <cuigaosheng1@huawei.com>
Tue, 29 Nov 2022 11:16:34 +0000 (19:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:37 +0000 (23:03 +0900)
commit548113502ea090c91fa3e8c6cff5f237087a7e38
tree9687f4961fe5dd69353079ce2dae0f4ef304c7c3
parent6c0df503cd2ef289a6cb65f51d0cf864a0bc5430
phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port

[ Upstream commit e024854048e733391b31fe5a398704b31b9af803 ]

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: 53d2a715c240 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/tegra/xusb.c