Skip to content

Commit c6165cf

Browse files
fugangduandavem330
authored andcommitted
net: fec: correct the error path for regulator disable in probe
Correct the error path for regulator disable. Fixes: 9269e55 ("net: fec: add phy-reset-gpios PROBE_DEFER check") Signed-off-by: Fugang Duan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b07e2a8 commit c6165cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,11 +3715,11 @@ fec_probe(struct platform_device *pdev)
37153715
failed_irq:
37163716
failed_init:
37173717
fec_ptp_stop(pdev);
3718-
if (fep->reg_phy)
3719-
regulator_disable(fep->reg_phy);
37203718
failed_reset:
37213719
pm_runtime_put_noidle(&pdev->dev);
37223720
pm_runtime_disable(&pdev->dev);
3721+
if (fep->reg_phy)
3722+
regulator_disable(fep->reg_phy);
37233723
failed_regulator:
37243724
clk_disable_unprepare(fep->clk_ahb);
37253725
failed_clk_ahb:

0 commit comments

Comments
 (0)