]> git.itanic.dy.fi Git - linux-stable/commit
phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 15 Apr 2022 14:03:10 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:34 +0000 (09:14 +0200)
commitd3dfa4954e35f36506023a3335e58ed6063f394b
treee566abd4ec735fccd2b54e8e6cff24701441fd05
parentb347b850a49f48e26f2cbc4aaac27d009b66a436
phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()

[ Upstream commit 2c8045d48dee703ad8eab2be7d6547765a89c069 ]

If clk_prepare_enable() fails we call clk_disable_unprepare()
in the error path what results in a warning that the clock
is disabled and unprepared already.
And if we fail later in phy_g12a_usb3_pcie_probe() then we
bail out w/o calling clk_disable_unprepare().
This patch fixes both errors.

Fixes: 36077e16c050 ("phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/8e416f95-1084-ee28-860e-7884f7fa2e32@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c