提交 f1db5c10 编写于 作者: T Tobias Regnery 提交者: David S. Miller

alx: fix wrong condition to free descriptor memory

The condition to free the descriptor memory is wrong, we want to free the
memory if it is set and not if it is unset. Invert the test to fix this
issue.

Fixes: b0999223f224b ("alx: add ability to allocate and free alx_napi structures")
Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5b9f5751
......@@ -703,7 +703,7 @@ static void alx_free_rings(struct alx_priv *alx)
if (alx->qnapi[0] && alx->qnapi[0]->rxq)
kfree(alx->qnapi[0]->rxq->bufs);
if (!alx->descmem.virt)
if (alx->descmem.virt)
dma_free_coherent(&alx->hw.pdev->dev,
alx->descmem.size,
alx->descmem.virt,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册