netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] airo: Don't check for NULL before kfree()
@ 2007-03-16 11:40 Michal Schmidt
  0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2007-03-16 11:40 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: breed-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f,
	dcbw-H+wXaHxf7aLQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA

It's unnecessary to check for NULL before calling kfree().

Signed-off-by: Michal Schmidt <mschmidt-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index a8c2bfe..71ac1f1 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2740,8 +2740,6 @@ static int airo_networks_allocate(struct airo_info *ai)
 
 static void airo_networks_free(struct airo_info *ai)
 {
-	if (!ai->networks)
-		return;
 	kfree(ai->networks);
 	ai->networks = NULL;
 }

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

only message in thread, other threads:[~2007-03-16 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16 11:40 [PATCH 1/3] airo: Don't check for NULL before kfree() Michal Schmidt

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).