phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Jan 2022 11:17:24 +0000 (14:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:22 +0000 (12:56 +0100)
commit94b16ca86ab688ed6fad4548f70137f93cf1f0a9
tree78233e846d3f288960e2e5f240fcd71f0b85b2cd
parent541ec7bfeed36a74b47ea8b440da0591ea05d555
phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()

[ Upstream commit cfc826c88a79e22ba5d8001556eb2c7efd8a01b6 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/st/phy-stm32-usbphyc.c