* [PATCH net-next] net: enetc: fix check for allocation failure
@ 2021-10-13 8:04 Dan Carpenter
2021-10-13 8:25 ` Ioana Ciornei
2021-10-13 23:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-10-13 8:04 UTC (permalink / raw)
To: Claudiu Manoil, Ioana Ciornei
Cc: David S. Miller, Jakub Kicinski, Vladimir Oltean, netdev,
kernel-janitors
This was supposed to be a check for if dma_alloc_coherent() failed
but it has a copy and paste bug so it will not work.
Fixes: fb8629e2cbfc ("net: enetc: add support for software TSO")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/freescale/enetc/enetc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 09193b478ab3..beecb1a1276e 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1766,8 +1766,10 @@ static int enetc_alloc_txbdr(struct enetc_bdr *txr)
txr->bd_count * TSO_HEADER_SIZE,
&txr->tso_headers_dma,
GFP_KERNEL);
- if (err)
+ if (!txr->tso_headers) {
+ err = -ENOMEM;
goto err_alloc_tso;
+ }
txr->next_to_clean = 0;
txr->next_to_use = 0;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: enetc: fix check for allocation failure
2021-10-13 8:04 [PATCH net-next] net: enetc: fix check for allocation failure Dan Carpenter
@ 2021-10-13 8:25 ` Ioana Ciornei
2021-10-13 23:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Ioana Ciornei @ 2021-10-13 8:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: Claudiu Manoil, David S. Miller, Jakub Kicinski, Vladimir Oltean,
netdev, kernel-janitors
On Wed, Oct 13, 2021 at 11:04:56AM +0300, Dan Carpenter wrote:
> This was supposed to be a check for if dma_alloc_coherent() failed
> but it has a copy and paste bug so it will not work.
>
> Fixes: fb8629e2cbfc ("net: enetc: add support for software TSO")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Thanks a lot.
Ioana
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: enetc: fix check for allocation failure
2021-10-13 8:04 [PATCH net-next] net: enetc: fix check for allocation failure Dan Carpenter
2021-10-13 8:25 ` Ioana Ciornei
@ 2021-10-13 23:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-13 23:10 UTC (permalink / raw)
To: Dan Carpenter
Cc: claudiu.manoil, ioana.ciornei, davem, kuba, vladimir.oltean,
netdev, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 13 Oct 2021 11:04:56 +0300 you wrote:
> This was supposed to be a check for if dma_alloc_coherent() failed
> but it has a copy and paste bug so it will not work.
>
> Fixes: fb8629e2cbfc ("net: enetc: add support for software TSO")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/net/ethernet/freescale/enetc/enetc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Here is the summary with links:
- [net-next] net: enetc: fix check for allocation failure
https://git.kernel.org/netdev/net-next/c/e79d82643a69
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] 3+ messages in thread
end of thread, other threads:[~2021-10-13 23:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 8:04 [PATCH net-next] net: enetc: fix check for allocation failure Dan Carpenter
2021-10-13 8:25 ` Ioana Ciornei
2021-10-13 23:10 ` 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).