phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
Make sure to disable the repeater PHY also on phy_init() failure.
Fixes: 3584f6392f ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater")
Cc: Abel Vesa <abel.vesa@linaro.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20250523084839.11015-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
@@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
|
||||
ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
|
||||
if (ret) {
|
||||
dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
|
||||
goto disable_vreg;
|
||||
goto exit_repeater;
|
||||
}
|
||||
|
||||
ret = reset_control_assert(phy->phy_reset);
|
||||
@@ -493,7 +493,8 @@ static int snps_eusb2_hsphy_init(struct phy *p)
|
||||
|
||||
disable_ref_clk:
|
||||
clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
|
||||
|
||||
exit_repeater:
|
||||
phy_exit(phy->repeater);
|
||||
disable_vreg:
|
||||
regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user