net: gemini: fix memory leak

cppcheck report:
[drivers/net/ethernet/cortina/gemini.c:543]: (error) Memory leak: skb_tab

Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Igor Pylypiv 2018-03-18 23:40:51 -07:00 committed by David S. Miller
parent 00777fac28
commit 44caebd368
1 changed files with 1 additions and 0 deletions

View File

@ -540,6 +540,7 @@ static int gmac_setup_txqs(struct net_device *netdev)
if (port->txq_dma_base & ~DMA_Q_BASE_MASK) { if (port->txq_dma_base & ~DMA_Q_BASE_MASK) {
dev_warn(geth->dev, "TX queue base it not aligned\n"); dev_warn(geth->dev, "TX queue base it not aligned\n");
kfree(skb_tab);
return -ENOMEM; return -ENOMEM;
} }