From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: netdev@vger.kernel.org
Subject: [PATCH] Always initialize fw_entry with NULL
Date: Mon, 29 Aug 2011 09:39:32 +0200 [thread overview]
Message-ID: <201108290939.32243.thomas.jarosch@intra2net.com> (raw)
Otherwise the exit code path might try to release
a non-existing firmware object on an error condition.
Issue detected by cppcheck.
Resending to netdev as orionco-devel seems to be sleeping.
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
drivers/net/wireless/orinoco/orinoco_usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c
b/drivers/net/wireless/orinoco/orinoco_usb.c
index 811e87f..973a55f 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -1579,7 +1579,7 @@ static int ezusb_probe(struct usb_interface
*interface,
struct ezusb_priv *upriv = NULL;
struct usb_interface_descriptor *iface_desc;
struct usb_endpoint_descriptor *ep;
- const struct firmware *fw_entry;
+ const struct firmware *fw_entry = NULL;
int retval = 0;
int i;
--
1.7.4.4
reply other threads:[~2011-08-29 8:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201108290939.32243.thomas.jarosch@intra2net.com \
--to=thomas.jarosch@intra2net.com \
--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 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).