* [PATCH] phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
@ 2022-01-12 11:17 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-01-12 11:17 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Amelie Delaunay
Cc: Vinod Koul, Maxime Coquelin, Alexandre Torgue, Andrew Morton,
Fabrice Gasnier, Daniel Lezcano, linux-phy, linux-stm32,
kernel-janitors
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>
---
drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
@ 2022-01-12 11:17 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-01-12 11:17 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Amelie Delaunay
Cc: Vinod Koul, Maxime Coquelin, Alexandre Torgue, Andrew Morton,
Fabrice Gasnier, Daniel Lezcano, linux-phy, linux-stm32,
kernel-janitors
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>
---
drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.20.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
2022-01-12 11:17 ` Dan Carpenter
@ 2022-01-27 5:34 ` Vinod Koul
-1 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-01-27 5:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: Kishon Vijay Abraham I, Amelie Delaunay, Maxime Coquelin,
Alexandre Torgue, Andrew Morton, Fabrice Gasnier, Daniel Lezcano,
linux-phy, linux-stm32, kernel-janitors
On 12-01-22, 14:17, Dan Carpenter wrote:
> This error path needs to decrement "usbphyc->n_pll_cons.counter" before
> returning.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
@ 2022-01-27 5:34 ` Vinod Koul
0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-01-27 5:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: Kishon Vijay Abraham I, Amelie Delaunay, Maxime Coquelin,
Alexandre Torgue, Andrew Morton, Fabrice Gasnier, Daniel Lezcano,
linux-phy, linux-stm32, kernel-janitors
On 12-01-22, 14:17, Dan Carpenter wrote:
> This error path needs to decrement "usbphyc->n_pll_cons.counter" before
> returning.
Applied, thanks
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-27 5:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 11:17 [PATCH] phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable() Dan Carpenter
2022-01-12 11:17 ` Dan Carpenter
2022-01-27 5:34 ` Vinod Koul
2022-01-27 5:34 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.