From: Michal Schmidt Date: Fri, 16 Mar 2007 11:40:00 +0000 (+0100) Subject: [PATCH] airo: Don't check for NULL before kfree() X-Git-Tag: v2.6.22-rc1~1110^2~64 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd48f8d3a3e147e666d838194d5f9de64403ecb1;p=linux-2.6 [PATCH] airo: Don't check for NULL before kfree() It's unnecessary to check for NULL before calling kfree(). Signed-off-by: Michal Schmidt Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 7fe0a61091..d08d2275ad 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; }