phy: lantiq: vrx200-pcie: fix error return code in ltq_vrx200_pcie_phy_power_on()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 4 Sep 2019 11:40:14 +0000 (11:40 +0000)
committerKishon Vijay Abraham I <kishon@ti.com>
Thu, 31 Oct 2019 11:24:01 +0000 (16:54 +0530)
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: e52a632195bf ("phy: lantiq: vrx200-pcie: add a driver for the Lantiq VRX200 PCIe PHY")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c

index 544d64a84cc0ac0da904c729eba146b94492ca7d..6e457967653ecb1a4397d8d0a15cbb9121d2db61 100644 (file)
@@ -323,7 +323,8 @@ static int ltq_vrx200_pcie_phy_power_on(struct phy *phy)
                goto err_disable_pdi_clk;
 
        /* Check if we are in "startup ready" status */
-       if (ltq_vrx200_pcie_phy_wait_for_pll(phy) != 0)
+       ret = ltq_vrx200_pcie_phy_wait_for_pll(phy);
+       if (ret)
                goto err_disable_phy_clk;
 
        ltq_vrx200_pcie_phy_apply_workarounds(phy);