]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: Check stmmac_hw_setup() in stmmac_resume()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 11 Aug 2025 07:35:04 +0000 (15:35 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Aug 2025 23:27:42 +0000 (16:27 -0700)
commit6896c2449a1858acb643014894d01b3a1223d4e5
tree2c75beae0ba34f7a19fef595e3e62fdd5e4fb29a
parentfdbe93b7f0f86c943351ceab26c8fad548869f91
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c