From: Bing Zhao <bzhao@marvell.com>
To: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Amitkumar Karwar <akarwar@marvell.com>,
Kiran Divekar <dkiran@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>,
Frank Huang <frankh@marvell.com>, Bing Zhao <bzhao@marvell.com>
Subject: [PATCH RESEND 1/4] mwifiex: remove unneeded kfree(NULL);
Date: Mon, 7 Nov 2011 19:31:44 -0800 [thread overview]
Message-ID: <1320723107-24202-2-git-send-email-bzhao@marvell.com> (raw)
In-Reply-To: <1320723107-24202-1-git-send-email-bzhao@marvell.com>
From: Dan Carpenter <dan.carpenter@oracle.com>
The previous if statement means this that pointer is NULL so there
is no need to free it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/pcie.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index d34acf0..4466976 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -386,7 +386,6 @@ static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter)
card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL);
if (!card->txbd_ring_vbase) {
dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n");
- kfree(card->txbd_ring_vbase);
return -1;
}
card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase);
--
1.7.0.2
next prev parent reply other threads:[~2011-11-08 3:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 3:31 [PATCH RESEND 0/4] mwifiex: resending missed patches Bing Zhao
2011-11-08 3:31 ` Bing Zhao [this message]
2011-11-08 3:31 ` [PATCH RESEND 2/4] mwifiex: remove an unneeded NULL check Bing Zhao
2011-11-08 3:31 ` [PATCH RESEND 3/4] mwifiex: enable SDIO multiport aggregation Bing Zhao
2011-11-08 3:31 ` [PATCH RESEND 4/4] mwifiex: prevent corruption instead of just warning Bing Zhao
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=1320723107-24202-2-git-send-email-bzhao@marvell.com \
--to=bzhao@marvell.com \
--cc=akarwar@marvell.com \
--cc=dan.carpenter@oracle.com \
--cc=dkiran@marvell.com \
--cc=frankh@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yogeshp@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox