DORMANTno replies

[PATCH 1/3] airo: Don't check for NULL before kfree()

From: Michal Schmidt <hidden>
Date: 2007-03-16 11:40:00
Also in: linux-wireless
Subsystem: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

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

Signed-off-by: Michal Schmidt <redacted>
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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help