From 25b0b999fbf5cc1893b110d530102951795d2f73 Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Mon, 8 Jun 2009 10:30:19 +0000 Subject: bnx2: no need to check before vfreeing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to check if a pointer is NULL before calling vfree(), since vfree() function already check for it. Signed-off-by: Breno Leitão Signed-off-by: David S. Miller --- drivers/net/bnx2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/net/bnx2.c') diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 391d2d47089c..f99e17e0a319 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -546,8 +546,7 @@ bnx2_free_rx_mem(struct bnx2 *bp) rxr->rx_desc_mapping[j]); 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; for (j = 0; j < bp->rx_max_pg_ring; j++) { @@ -557,8 +556,7 @@ bnx2_free_rx_mem(struct bnx2 *bp) rxr->rx_pg_desc_mapping[j]); 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; } } -- cgit v1.2.3-58-ga151