summaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-11 02:49:10 -0700
committerDavid S. Miller <davem@davemloft.net>2009-06-11 02:49:10 -0700
commitf2333a014c1e13ac8e1b73a6fd77731c524eff78 (patch)
tree4e3b5dfb59a9c8a62e36e75e54a6fae6555fb428 /drivers/net/netxen
parent934037bc2ed29a94bbde72aa6a2e66bdc5861b98 (diff)
downloadop-kernel-dev-f2333a014c1e13ac8e1b73a6fd77731c524eff78.zip
op-kernel-dev-f2333a014c1e13ac8e1b73a6fd77731c524eff78.tar.gz
netxen: No need to check vfree() pointer.
vfree() does its own 'NULL' check, so no need for check before calling it. Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c9
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 4a51c31..6f77ad5 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -178,10 +178,8 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter)
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;
}
kfree(recv_ctx->rds_rings);
@@ -190,8 +188,7 @@ skip_rds:
return;
tx_ring = adapter->tx_ring;
- if (tx_ring->cmd_buf_arr)
- vfree(tx_ring->cmd_buf_arr);
+ vfree(tx_ring->cmd_buf_arr);
}
int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
OpenPOWER on IntegriCloud