* [PATCH]netxen: fix checking
@ 2009-06-10 14:13 Figo.zhang
2009-06-11 9:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Figo.zhang @ 2009-06-10 14:13 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Dhananjay Phadke
vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-11 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-10 14:13 [PATCH]netxen: fix checking Figo.zhang
2009-06-11 9:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).