Netdev List
 help / color / mirror / Atom feed
* [PATCH] netxen: Remove redundant NULL check before kfree
@ 2013-02-26 19:53 Syam Sidhardhan
  0 siblings, 0 replies; only message in thread
From: Syam Sidhardhan @ 2013-02-26 19:53 UTC (permalink / raw)
  To: netdev; +Cc: syamsidhardh, sony.chacko, rajesh.borundia

kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
 .../net/ethernet/qlogic/netxen/netxen_nic_main.c   |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 501f492..377b521 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -178,8 +178,7 @@ netxen_alloc_sds_rings(struct netxen_recv_context *recv_ctx, int count)
 static void
 netxen_free_sds_rings(struct netxen_recv_context *recv_ctx)
 {
-	if (recv_ctx->sds_rings != NULL)
-		kfree(recv_ctx->sds_rings);
+	kfree(recv_ctx->sds_rings);
 
 	recv_ctx->sds_rings = NULL;
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-26 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 19:53 [PATCH] netxen: Remove redundant NULL check before kfree Syam Sidhardhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox