phy: rockchip: handle clock without enable function
If a clock doesn't supply the enable hook, clk_enable() will return -ENOSYS. In this case the clock is always enabled so there is no error and the phy initialisation should continue. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
216928c772
commit
b5194c2258
@ -119,7 +119,7 @@ static int rockchip_usb2phy_init(struct phy *phy)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = clk_enable(&priv->phyclk);
|
ret = clk_enable(&priv->phyclk);
|
||||||
if (ret) {
|
if (ret && ret != -ENOSYS) {
|
||||||
dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret);
|
dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user