phy: rockchip-emmc: emmc_phy_init() always return 0
authorChris Ruehl <chris.ruehl@gtsys.com.hk>
Thu, 10 Dec 2020 08:04:54 +0000 (16:04 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 13 Jan 2021 11:58:24 +0000 (17:28 +0530)
commit39961bd6b70e5a5d7c4b5483ad8e1db6b5765c60
treede134f2ec5980cd3ab2d9e55586eb4ab9268de60
parentd092bd9110494de3372722b317510b3692f1b2fe
phy: rockchip-emmc: emmc_phy_init() always return 0

rockchip_emmc_phy_init() return variable is not set with the error value
if clk_get() failed. 'emmcclk' is optional, thus use clk_get_optional()
and if the return value != NULL make error processing and set the
return code accordingly.

Fixes: 52c0624a10cce phy: rockchip-emmc: Set phyctrl_frqsel based on card clock
Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20201210080454.17379-1-chris.ruehl@gtsys.com.hk
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/rockchip/phy-rockchip-emmc.c