net: enetc: fix check for allocation failure
PATCH 1/1 net: enetc: fix check for allocation failure
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 <[email protected]>
--- drivers/net/ethernet/freescale/enetc/enetc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/enetc/enetc.c +3 -1
@@ -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 ;
Signature · 1 line
2.20.1
Quoted 5 lines · Dan Carpenter
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 <[email protected]>
Reviewed-by Ioana Ciornei <[email protected]>
Thanks a lot.
Ioana
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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 <[email protected]>--- 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