Commit 37344718 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Jakub Kicinski

net: phy: smsc: add missed clk_disable_unprepare in smsc_phy_probe()

Add the missing clk_disable_unprepare() before return from
smsc_phy_probe() in the error handling case.

Fixes: bedd8d78 ("net: phy: smsc: LAN8710/20: add phy refclk in support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605180239-1792-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ceb736e1
...@@ -291,8 +291,10 @@ static int smsc_phy_probe(struct phy_device *phydev) ...@@ -291,8 +291,10 @@ static int smsc_phy_probe(struct phy_device *phydev)
return ret; return ret;
ret = clk_set_rate(priv->refclk, 50 * 1000 * 1000); ret = clk_set_rate(priv->refclk, 50 * 1000 * 1000);
if (ret) if (ret) {
clk_disable_unprepare(priv->refclk);
return ret; return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment