[PATCH net-next] net: stmmac: Fix error return code in ingenic_mac_probe()

Subsystems: networking drivers, stmmac ethernet driver, the rest

STALE1879d

2 messages, 2 authors, 2021-06-16 · open the first message on its own page

[PATCH net-next] net: stmmac: Fix error return code in ingenic_mac_probe()

From: Wei Yongjun <hidden>
Date: 2021-06-15 21:09:39

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 2bb4b98b60d7 ("net: stmmac: Add Ingenic SoCs MAC support.")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
index 60984c1a154d..9a6d819b84ae 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
@@ -263,6 +263,7 @@ static int ingenic_mac_probe(struct platform_device *pdev)
 	mac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "mode-reg");
 	if (IS_ERR(mac->regmap)) {
 		dev_err(&pdev->dev, "%s: Failed to get syscon regmap\n", __func__);
+		ret = PTR_ERR(mac->regmap);
 		goto err_remove_config_dt;
 	}
 

Re: [PATCH net-next] net: stmmac: Fix error return code in ingenic_mac_probe()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-06-16 19:11:40

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Tue, 15 Jun 2021 17:21:55 +0000 you wrote:
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 2bb4b98b60d7 ("net: stmmac: Add Ingenic SoCs MAC support.")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>

[...]
Here is the summary with links:
  - [net-next] net: stmmac: Fix error return code in ingenic_mac_probe()
    https://git.kernel.org/netdev/net-next/c/61273f9d8314

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help