mirror of https://gitee.com/openkylin/linux.git
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: bedd8d78ab
("net: phy: smsc: LAN8710/20: add phy refclk in support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605180239-1792-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ceb736e1d4
commit
37344718bd
|
@ -291,8 +291,10 @@ static int smsc_phy_probe(struct phy_device *phydev)
|
|||
return ret;
|
||||
|
||||
ret = clk_set_rate(priv->refclk, 50 * 1000 * 1000);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
clk_disable_unprepare(priv->refclk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue