net: bcmasp: Fix error code in probe()
PATCH 1/1 net: bcmasp: Fix error code in probe()
Return an error code if bcmasp_interface_create() fails. Don't return success.
--- drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/asp2/bcmasp.c +1 -0
@@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev)dev_err (dev,"Cannot create eth interface %d\n" , i);bcmasp_remove_intfs (priv);of_node_put (intf_node); + ret = -ENOMEM ; goto of_put_exit; }list_add_tail (&intf->list, &priv->intfs);
Signature · 1 line
2.43.0
Quoted 1 line · Dan Carpenter
Return an error code if
bcmasp_interface_create()fails. Don't return
nitpick: redundant space after "fails."
Quoted 24 lines
success.
Fixes 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/asp2/bcmasp.c +1
-0@@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev)dev_err (dev,"Cannot create eth interface %d\n" , i);bcmasp_remove_intfs (priv);of_node_put (intf_node); + ret = -ENOMEM ; goto of_put_exit; }list_add_tail (&intf->list, &priv->intfs);Signature · 1 line
2.43.0
The patch actually fixes an obvious bug.
Thanks,
Quoted 2 lines
Return an error code if
bcmasp_interface_create()fails. Don't return success.
Would you like to refer to the function name “bcmasp_probe” in the summary phrase?
Regards,
Markus
Quoted 5 lines · Dan Carpenter
Return an error code if
bcmasp_interface_create()fails. Don't return success.Fixes 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")Signed-off-by Dan Carpenter <[email protected]>
Quoted 16 lines
--- drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/asp2/bcmasp.c +1
-0@@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev)dev_err (dev,"Cannot create eth interface %d\n" , i);bcmasp_remove_intfs (priv);of_node_put (intf_node); + ret = -ENOMEM ; goto of_put_exit; }list_add_tail (&intf->list, &priv->intfs);
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 4 Jul 2024 10:19:44 -0500 you wrote:
Return an error code if
bcmasp_interface_create()fails. Don't return success.Fixes 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 + 1 file changed, 1 insertion(+)
Here is the summary with links:
- [net] net: bcmasp: Fix error code in probe()
https://git.kernel.org/netdev/net/c/0c754d9d86ff
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html