aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-11 05:49:10 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-11 05:49:10 -0400
commitf2333a014c1e13ac8e1b73a6fd77731c524eff78 (patch)
tree4e3b5dfb59a9c8a62e36e75e54a6fae6555fb428 /drivers/net
parent934037bc2ed29a94bbde72aa6a2e66bdc5861b98 (diff)
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')
-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 4a51c31330da..6f77ad58e3b3 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)
178 178
179 for (ring = 0; ring < adapter->max_rds_rings; ring++) { 179 for (ring = 0; ring < adapter->max_rds_rings; ring++) {
180 rds_ring = &recv_ctx->rds_rings[ring]; 180 rds_ring = &recv_ctx->rds_rings[ring];
181 if (rds_ring->rx_buf_arr) { 181 vfree(rds_ring->rx_buf_arr);
182 vfree(rds_ring->rx_buf_arr); 182 rds_ring->rx_buf_arr = NULL;
183 rds_ring->rx_buf_arr = NULL;
184 }
185 } 183 }
186 kfree(recv_ctx->rds_rings); 184 kfree(recv_ctx->rds_rings);
187 185
@@ -190,8 +188,7 @@ skip_rds:
190 return; 188 return;
191 189
192 tx_ring = adapter->tx_ring; 190 tx_ring = adapter->tx_ring;
193 if (tx_ring->cmd_buf_arr) 191 vfree(tx_ring->cmd_buf_arr);
194 vfree(tx_ring->cmd_buf_arr);
195} 192}
196 193
197int netxen_alloc_sw_resources(struct netxen_adapter *adapter) 194int netxen_alloc_sw_resources(struct netxen_adapter *adapter)