Commit 25b0b999 authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller

bnx2: no need to check before vfreeing

There is no need to check if a pointer is NULL before calling
vfree(), since vfree() function already check for it.
Signed-off-by: default avatarBreno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3d8fd385
...@@ -546,7 +546,6 @@ bnx2_free_rx_mem(struct bnx2 *bp) ...@@ -546,7 +546,6 @@ bnx2_free_rx_mem(struct bnx2 *bp)
rxr->rx_desc_mapping[j]); rxr->rx_desc_mapping[j]);
rxr->rx_desc_ring[j] = NULL; rxr->rx_desc_ring[j] = NULL;
} }
if (rxr->rx_buf_ring)
vfree(rxr->rx_buf_ring); vfree(rxr->rx_buf_ring);
rxr->rx_buf_ring = NULL; rxr->rx_buf_ring = NULL;
...@@ -557,7 +556,6 @@ bnx2_free_rx_mem(struct bnx2 *bp) ...@@ -557,7 +556,6 @@ bnx2_free_rx_mem(struct bnx2 *bp)
rxr->rx_pg_desc_mapping[j]); rxr->rx_pg_desc_mapping[j]);
rxr->rx_pg_desc_ring[j] = NULL; rxr->rx_pg_desc_ring[j] = NULL;
} }
if (rxr->rx_pg_ring)
vfree(rxr->rx_pg_ring); vfree(rxr->rx_pg_ring);
rxr->rx_pg_ring = NULL; rxr->rx_pg_ring = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment