Skip to content

Commit bcf3752

Browse files
Yang Yinglianggregkh
authored andcommitted
net: stmmac: fix missing unlock on error in stmmac_suspend()
commit 30f347a upstream Add the missing unlock before return from stmmac_suspend() in the error handling case. Fixes: 5ec5582 ("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>
1 parent 483ed89 commit bcf3752

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5275,8 +5275,10 @@ int stmmac_suspend(struct device *dev)
52755275
/* Disable clock in case of PWM is off */
52765276
clk_disable_unprepare(priv->plat->clk_ptp_ref);
52775277
ret = pm_runtime_force_suspend(dev);
5278-
if (ret)
5278+
if (ret) {
5279+
mutex_unlock(&priv->lock);
52795280
return ret;
5281+
}
52805282
}
52815283
mutex_unlock(&priv->lock);
52825284

0 commit comments

Comments
 (0)