diff options
author | Tobias Regnery <tobias.regnery@gmail.com> | 2017-01-24 14:34:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-24 21:27:58 +0100 |
commit | f1db5c101cd48b5555ed9e061dcc49ed329812ea (patch) | |
tree | 1de63dbbeb69250983d3d8b7d3e21d2d18f768d1 /drivers/net/ethernet/atheros | |
parent | qmi_wwan/cdc_ether: add device ID for HP lt2523 (Novatel E371) WWAN card (diff) | |
download | linux-f1db5c101cd48b5555ed9e061dcc49ed329812ea.tar.xz linux-f1db5c101cd48b5555ed9e061dcc49ed329812ea.zip |
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: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/alx/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c index c8f525574d68..765306bd78c2 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c @@ -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, |