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)
committerVinod Koul <vkoul@kernel.org>
Wed, 20 Apr 2022 09:12:44 +0000 (14:42 +0530)
commit2c8045d48dee703ad8eab2be7d6547765a89c069
treebca1222ce92af4ac3481464d63d7afb5fb74c160
parentce88613e5bd579478653a028291098143f2a5bdf
phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()

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>
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c