summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-09-04 11:40:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-26 10:01:00 +0100
commit1f51f661fd2be6349441a2aa8e558409d37b6aab (patch)
tree618155c2057f368ead3ab9e7a53cd9eaee0ee7d5 /drivers/phy
parent142cb2bd612d0dfe7ef5d5fa788bcb7b10d6b4f2 (diff)
downloadlinux-1f51f661fd2be6349441a2aa8e558409d37b6aab.tar.gz
linux-1f51f661fd2be6349441a2aa8e558409d37b6aab.tar.bz2
linux-1f51f661fd2be6349441a2aa8e558409d37b6aab.zip
phy: lantiq: vrx200-pcie: fix error return code in ltq_vrx200_pcie_phy_power_on()
commit 82b5d164415549e74cfa1f9156ffd4463d0a76e2 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c b/drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c
index 544d64a84cc0..6e457967653e 100644
--- a/drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c
+++ b/drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c
@@ -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);