提交 30f347ae 编写于 作者: Y Yang Yingliang 提交者: David S. Miller

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: 5ec55823 ("net: stmmac: add clocks management for gmac driver")
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 284fda1e
...@@ -5964,8 +5964,10 @@ int stmmac_suspend(struct device *dev) ...@@ -5964,8 +5964,10 @@ int stmmac_suspend(struct device *dev)
/* Disable clock in case of PWM is off */ /* Disable clock in case of PWM is off */
clk_disable_unprepare(priv->plat->clk_ptp_ref); clk_disable_unprepare(priv->plat->clk_ptp_ref);
ret = pm_runtime_force_suspend(dev); ret = pm_runtime_force_suspend(dev);
if (ret) if (ret) {
mutex_unlock(&priv->lock);
return ret; return ret;
}
} }
mutex_unlock(&priv->lock); mutex_unlock(&priv->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册