提交 78d80692 编写于 作者: Y Yang Yingliang 提交者: Zheng Zengkai

net: stmmac: fix missing unlock on error in stmmac_suspend()

stable inclusion
from stable-5.10.81
commit bcf37522432dcacae18e1cec7c41308505d5ea22
bugzilla: 185832 https://gitee.com/openeuler/kernel/issues/I4L9CF

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bcf37522432dcacae18e1cec7c41308505d5ea22

--------------------------------

commit 30f347ae upstream

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>
Signed-off-by: NMeng Li <Meng.Li@windriver.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d338d168
......@@ -5275,8 +5275,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册