aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2009-06-08 06:30:19 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-09 08:25:38 -0400
commit25b0b999fbf5cc1893b110d530102951795d2f73 (patch)
treef705cd5422b1214bc652ec08811f6e1a53b211eb /drivers/net/bnx2.c
parent3d8fd38567729202afd0ff3904c818ed0cb1de52 (diff)
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: Breno Leitão <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c6
1 files changed, 2 insertions, 4 deletions
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)
546 rxr->rx_desc_mapping[j]); 546 rxr->rx_desc_mapping[j]);
547 rxr->rx_desc_ring[j] = NULL; 547 rxr->rx_desc_ring[j] = NULL;
548 } 548 }
549 if (rxr->rx_buf_ring) 549 vfree(rxr->rx_buf_ring);
550 vfree(rxr->rx_buf_ring);
551 rxr->rx_buf_ring = NULL; 550 rxr->rx_buf_ring = NULL;
552 551
553 for (j = 0; j < bp->rx_max_pg_ring; j++) { 552 for (j = 0; j < bp->rx_max_pg_ring; j++) {
@@ -557,8 +556,7 @@ bnx2_free_rx_mem(struct bnx2 *bp)
557 rxr->rx_pg_desc_mapping[j]); 556 rxr->rx_pg_desc_mapping[j]);
558 rxr->rx_pg_desc_ring[j] = NULL; 557 rxr->rx_pg_desc_ring[j] = NULL;
559 } 558 }
560 if (rxr->rx_pg_ring) 559 vfree(rxr->rx_pg_ring);
561 vfree(rxr->rx_pg_ring);
562 rxr->rx_pg_ring = NULL; 560 rxr->rx_pg_ring = NULL;
563 } 561 }
564} 562}