Commit 30f347ae authored by Yang Yingliang's avatar Yang Yingliang Committed by 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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 284fda1e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment