aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/phy
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-01-12 14:17:24 +0300
committerVinod Koul <vkoul@kernel.org>2022-01-27 11:04:40 +0530
commitcfc826c88a79e22ba5d8001556eb2c7efd8a01b6 (patch)
treec537fb9d35151d89e577751fc5cdb599b03785c0 /drivers/phy
parentphy: xilinx: zynqmp: Fix bus width setting for SGMII (diff)
downloadwireguard-linux-cfc826c88a79e22ba5d8001556eb2c7efd8a01b6.tar.xz
wireguard-linux-cfc826c88a79e22ba5d8001556eb2c7efd8a01b6.zip
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: 5b1af71280ab ("phy: stm32: rework PLL Lock detection") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220112111724.GB3019@kili Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/st/phy-stm32-usbphyc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
index 2ce9bfd783d4..007a23c78d56 100644
--- a/drivers/phy/st/phy-stm32-usbphyc.c
+++ b/drivers/phy/st/phy-stm32-usbphyc.c
@@ -304,7 +304,7 @@ static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc)
ret = __stm32_usbphyc_pll_disable(usbphyc);
if (ret)
- return ret;
+ goto dec_n_pll_cons;
}
ret = stm32_usbphyc_regulators_enable(usbphyc);