]> git.karo-electronics.de Git - linux-beck.git/commitdiff
phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off()
authorDouglas Anderson <dianders@chromium.org>
Mon, 20 Jun 2016 17:56:52 +0000 (10:56 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:20 +0000 (10:34 +0200)
There's no reason to store the return value of rockchip_emmc_phy_power()
in a variable nor to check it.  Just return it.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/phy/phy-rockchip-emmc.c

index 2d059c0469782d4b538dbcf0b126da57cdd9cdf5..23fe50864526266d1f08599fa5ffb85a94e8e1d6 100644 (file)
@@ -169,20 +169,14 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy,
 static int rockchip_emmc_phy_power_off(struct phy *phy)
 {
        struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
-       int ret = 0;
 
        /* Power down emmc phy analog blocks */
-       ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
-       if (ret)
-               return ret;
-
-       return 0;
+       return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
 }
 
 static int rockchip_emmc_phy_power_on(struct phy *phy)
 {
        struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
-       int ret = 0;
 
        /* DLL operation: 200 MHz */
        regmap_write(rk_phy->reg_base,
@@ -213,11 +207,7 @@ static int rockchip_emmc_phy_power_on(struct phy *phy)
                                   PHYCTRL_OTAPDLYSEL_SHIFT));
 
        /* Power up emmc phy analog blocks */
-       ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
-       if (ret)
-               return ret;
-
-       return 0;
+       return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
 }
 
 static const struct phy_ops ops = {