Patchwork netxen: Remove redundant NULL check before kfree

login
register
mail settings
Submitter Syam Sidhardhan
Date Feb. 26, 2013, 7:53 p.m.
Message ID <1361908385-3248-1-git-send-email-s.syam@samsung.com>
Download mbox | patch
Permalink /patch/223384/
State Deferred
Delegated to: David Miller
Headers show

Comments

Syam Sidhardhan - Feb. 26, 2013, 7:53 p.m.
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(-)

Patch

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;
 }