Subject: [PATCH]netxen: fix checking

From: "Figo.zhang" <[email-masked]>
Date: Wed, 10 Jun 2009 22:13:47 +0800

vfree() does its own 'NULL' check, so no need for check before
calling it.

Signed-off-by: Figo.zhang <[email-masked]>
---   
 drivers/net/netxen/netxen_nic_init.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 0759c35..7ab0aa4 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -208,14 +208,11 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter)
 	recv_ctx = &adapter->recv_ctx;
 	for (ring = 0; ring < adapter->max_rds_rings; ring++) {
 		rds_ring = &recv_ctx->rds_rings[ring];
-		if (rds_ring->rx_buf_arr) {
-			vfree(rds_ring->rx_buf_arr);
-			rds_ring->rx_buf_arr = NULL;
-		}
+		vfree(rds_ring->rx_buf_arr);
+		rds_ring->rx_buf_arr = NULL;
 	}
 
-	if (adapter->cmd_buf_arr)
-		vfree(adapter->cmd_buf_arr);
+	vfree(adapter->cmd_buf_arr);
 	return;
 }