Skip to content

Commit 3232a6b

Browse files
jhovoldvinodkoul
authored andcommitted
phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
Make sure to disable the repeater PHY also on phy_init() failure. Fixes: 3584f63 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater") Cc: Abel Vesa <[email protected]> Cc: Neil Armstrong <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 641fa5b commit 3232a6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/phy/phy-snps-eusb2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
468468
ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
469469
if (ret) {
470470
dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
471-
goto disable_vreg;
471+
goto exit_repeater;
472472
}
473473

474474
ret = reset_control_assert(phy->phy_reset);
@@ -493,7 +493,8 @@ static int snps_eusb2_hsphy_init(struct phy *p)
493493

494494
disable_ref_clk:
495495
clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
496-
496+
exit_repeater:
497+
phy_exit(phy->repeater);
497498
disable_vreg:
498499
regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
499500

0 commit comments

Comments
 (0)