* [PATCH net] net: bcmasp: Fix error code in probe()
@ 2024-07-04 15:19 Dan Carpenter
2024-07-04 15:49 ` Michal Kubiak
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-07-04 15:19 UTC (permalink / raw)
To: Justin Chen
Cc: Florian Fainelli, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, bcm-kernel-feedback-list, netdev,
linux-kernel, kernel-janitors
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 <dan.carpenter@linaro.org>
---
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
index a806dadc4196..20c6529ec135 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
@@ -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);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: bcmasp: Fix error code in probe()
2024-07-04 15:19 [PATCH net] net: bcmasp: Fix error code in probe() Dan Carpenter
@ 2024-07-04 15:49 ` Michal Kubiak
2024-07-04 16:02 ` Markus Elfring
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michal Kubiak @ 2024-07-04 15:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Justin Chen, Florian Fainelli, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman,
bcm-kernel-feedback-list, netdev, linux-kernel, kernel-janitors
On Thu, Jul 04, 2024 at 10:19:44AM -0500, Dan Carpenter wrote:
> Return an error code if bcmasp_interface_create() fails. Don't return
nitpick: redundant space after "fails."
> success.
>
> Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> index a806dadc4196..20c6529ec135 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> @@ -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);
> --
> 2.43.0
>
>
The patch actually fixes an obvious bug.
Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: bcmasp: Fix error code in probe()
2024-07-04 15:19 [PATCH net] net: bcmasp: Fix error code in probe() Dan Carpenter
2024-07-04 15:49 ` Michal Kubiak
@ 2024-07-04 16:02 ` Markus Elfring
2024-07-05 22:49 ` Justin Chen
2024-07-06 0:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2024-07-04 16:02 UTC (permalink / raw)
To: Dan Carpenter, bcm-kernel-feedback-list, netdev, Justin Chen
Cc: kernel-janitors, LKML, David S. Miller, Eric Dumazet,
Florian Fainelli, Jakub Kicinski, Paolo Abeni, Simon Horman
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: bcmasp: Fix error code in probe()
2024-07-04 15:19 [PATCH net] net: bcmasp: Fix error code in probe() Dan Carpenter
2024-07-04 15:49 ` Michal Kubiak
2024-07-04 16:02 ` Markus Elfring
@ 2024-07-05 22:49 ` Justin Chen
2024-07-06 0:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Justin Chen @ 2024-07-05 22:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Florian Fainelli, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, bcm-kernel-feedback-list, netdev,
linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
On 7/4/24 8:19 AM, Dan Carpenter 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 <dan.carpenter@linaro.org>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> index a806dadc4196..20c6529ec135 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> @@ -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);
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4206 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: bcmasp: Fix error code in probe()
2024-07-04 15:19 [PATCH net] net: bcmasp: Fix error code in probe() Dan Carpenter
` (2 preceding siblings ...)
2024-07-05 22:49 ` Justin Chen
@ 2024-07-06 0:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-06 0:20 UTC (permalink / raw)
To: Dan Carpenter
Cc: justin.chen, florian.fainelli, davem, edumazet, kuba, pabeni,
horms, bcm-kernel-feedback-list, netdev, linux-kernel,
kernel-janitors
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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 <dan.carpenter@linaro.org>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-06 0:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 15:19 [PATCH net] net: bcmasp: Fix error code in probe() Dan Carpenter
2024-07-04 15:49 ` Michal Kubiak
2024-07-04 16:02 ` Markus Elfring
2024-07-05 22:49 ` Justin Chen
2024-07-06 0:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).