mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
net: stmmac: Check stmmac_hw_setup() in stmmac_resume()
stmmac_hw_setup() may return 0 on success and an appropriate negative integer as defined in errno.h file on failure, just check it and then return early if failed in stmmac_resume(). Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://patch.msgid.link/20250811073506.27513-2-yangtiezhu@loongson.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
fdbe93b7f0
commit
6896c2449a
|
|
@ -7984,7 +7984,14 @@ int stmmac_resume(struct device *dev)
|
|||
stmmac_free_tx_skbufs(priv);
|
||||
stmmac_clear_descriptors(priv, &priv->dma_conf);
|
||||
|
||||
stmmac_hw_setup(ndev, false);
|
||||
ret = stmmac_hw_setup(ndev, false);
|
||||
if (ret < 0) {
|
||||
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
|
||||
mutex_unlock(&priv->lock);
|
||||
rtnl_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
stmmac_init_coalesce(priv);
|
||||
phylink_rx_clk_stop_block(priv->phylink);
|
||||
stmmac_set_rx_mode(ndev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user