mirror of https://gitee.com/openkylin/linux.git
net: stmmac: fix missing unlock on error in stmmac_suspend()
Add the missing unlock before return from stmmac_suspend()
in the error handling case.
Fixes: 5ec5582343
("net: stmmac: add clocks management for gmac driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
284fda1eff
commit
30f347ae7c
|
@ -5964,8 +5964,10 @@ int stmmac_suspend(struct device *dev)
|
|||
/* Disable clock in case of PWM is off */
|
||||
clk_disable_unprepare(priv->plat->clk_ptp_ref);
|
||||
ret = pm_runtime_force_suspend(dev);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mutex_unlock(&priv->lock);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&priv->lock);
|
||||
|
|
Loading…
Reference in New Issue