Commit f2333a01 authored by Figo.zhang's avatar Figo.zhang Committed by David S. Miller

netxen: No need to check vfree() pointer.

vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: default avatarFigo.zhang <figo1802@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 934037bc
......@@ -178,11 +178,9 @@ 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;
}
}
kfree(recv_ctx->rds_rings);
skip_rds:
......@@ -190,7 +188,6 @@ skip_rds:
return;
tx_ring = adapter->tx_ring;
if (tx_ring->cmd_buf_arr)
vfree(tx_ring->cmd_buf_arr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment