lkml.org 
[lkml]   [2019]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: gemini: Fix memory leak in gmac_setup_txqs
From
Date
> +++ b/drivers/net/ethernet/cortina/gemini.c
> @@ -576,6 +576,8 @@ static int gmac_setup_txqs(struct net_device *netdev)
>
> if (port->txq_dma_base & ~DMA_Q_BASE_MASK) {
> dev_warn(geth->dev, "TX queue base is not aligned\n");
> + dma_free_coherent(geth->dev, len * sizeof(*desc_ring),
> + desc_ring, port->txq_dma_base);
> kfree(skb_tab);
> return -ENOMEM;
> }

The added function call seems to be fine.
Would you like to avoid a bit of duplicate code for the exception handling?

Regards,
Markus

\
 
 \ /
  Last update: 2019-12-15 15:28    [W:0.037 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site