From: Michal Schmidt <mschmidt@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: breed@users.sourceforge.net, dcbw@redhat.com, netdev@vger.kernel.org
Subject: [PATCH 1/3] airo: Don't check for NULL before kfree()
Date: Fri, 16 Mar 2007 12:40:00 +0100 [thread overview]
Message-ID: <45FA8210.7080709@redhat.com> (raw)
It's unnecessary to check for NULL before calling kfree().
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
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;
}
WARNING: multiple messages have this Message-ID (diff)
From: Michal Schmidt <mschmidt-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: breed-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
dcbw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/3] airo: Don't check for NULL before kfree()
Date: Fri, 16 Mar 2007 12:40:00 +0100 [thread overview]
Message-ID: <45FA8210.7080709@redhat.com> (raw)
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;
}
next reply other threads:[~2007-03-16 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 11:40 Michal Schmidt [this message]
2007-03-16 11:40 ` [PATCH 1/3] airo: Don't check for NULL before kfree() Michal Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45FA8210.7080709@redhat.com \
--to=mschmidt@redhat.com \
--cc=breed@users.sourceforge.net \
--cc=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.