net: stmmac: fix missing unlock on error in stmmac_suspend()
commit 30f347ae7cc1178c431f968a89d4b4a375bc0d39 upstream Add the missing unlock before return from stmmac_suspend() in the error handling case. Fixes: 5ec55823438e ("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> Signed-off-by: Meng Li <Meng.Li@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
483ed89522
commit
bcf3752243
@@ -5275,9 +5275,11 @@ 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);
|
||||||
|
|
||||||
priv->speed = SPEED_UNKNOWN;
|
priv->speed = SPEED_UNKNOWN;
|
||||||
|
Reference in New Issue
Block a user