Skip to content

Commit cfc826c

Browse files
Dan Carpentervinodkoul
authored andcommitted
phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
This error path needs to decrement "usbphyc->n_pll_cons.counter" before returning. Fixes: 5b1af71 ("phy: stm32: rework PLL Lock detection") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/20220112111724.GB3019@kili Signed-off-by: Vinod Koul <[email protected]>
1 parent 37291f6 commit cfc826c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/phy/st/phy-stm32-usbphyc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc)
304304

305305
ret = __stm32_usbphyc_pll_disable(usbphyc);
306306
if (ret)
307-
return ret;
307+
goto dec_n_pll_cons;
308308
}
309309

310310
ret = stm32_usbphyc_regulators_enable(usbphyc);

0 commit comments

Comments
 (0)