diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-11-12 19:23:59 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-14 11:21:13 -0800 |
commit | 37344718bd7032639a02053e06b51697f90154ce (patch) | |
tree | 92c606844398af4f07439796c7e85b168022525f /drivers/net/phy/smsc.c | |
parent | ceb736e1d45c253f5e86b185ca9b497cdd43063f (diff) |
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: bedd8d78aba3 ("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>
Diffstat (limited to 'drivers/net/phy/smsc.c')
-rw-r--r-- | drivers/net/phy/smsc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index ec97669be5c2..0fc39ac5ca88 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -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; } |