Skip to content

Commit 352051e

Browse files
diandersUlf Hansson
authored andcommitted
phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off()
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>
1 parent 1107545 commit 352051e

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

‎drivers/phy/phy-rockchip-emmc.c‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,14 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy,
169169
static int rockchip_emmc_phy_power_off(struct phy *phy)
170170
{
171171
struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
172-
int ret = 0;
173172

174173
/* Power down emmc phy analog blocks */
175-
ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
176-
if (ret)
177-
return ret;
178-
179-
return 0;
174+
return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
180175
}
181176

182177
static int rockchip_emmc_phy_power_on(struct phy *phy)
183178
{
184179
struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
185-
int ret = 0;
186180

187181
/* DLL operation: 200 MHz */
188182
regmap_write(rk_phy->reg_base,
@@ -213,11 +207,7 @@ static int rockchip_emmc_phy_power_on(struct phy *phy)
213207
PHYCTRL_OTAPDLYSEL_SHIFT));
214208

215209
/* Power up emmc phy analog blocks */
216-
ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
217-
if (ret)
218-
return ret;
219-
220-
return 0;
210+
return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
221211
}
222212

223213
static const struct phy_ops ops = {

0 commit comments

Comments
 (0)