From: Tomas Winkler <tomas.winkler@intel.com>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [staging] staging/mei: fix possible usage of uninitialized variable
Date: Thu, 16 Jun 2011 00:46:03 +0300 [thread overview]
Message-ID: <1308174363-18876-1-git-send-email-tomas.winkler@intel.com> (raw)
Fix warning: reported in http://marc.info/?l=linux-kernel&m=130812960402606&w=2
drivers/staging/mei/interrupt.c: warning: 'buffer' may be used uninitialized in this function: => 198
It is a real issue and wrong path in execution is taken when
list is empty or (cl && _mei_irq_thread_state_ok(cl, mei_hdr))
evaluates to false
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
This patch should be considered for 3.0
drivers/staging/mei/interrupt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c
index 2ff30ee..9cb186b 100644
--- a/drivers/staging/mei/interrupt.c
+++ b/drivers/staging/mei/interrupt.c
@@ -195,7 +195,7 @@ static int mei_irq_thread_read_client_message(struct mei_io_list *complete_list,
{
struct mei_cl *cl;
struct mei_cl_cb *cb_pos = NULL, *cb_next = NULL;
- unsigned char *buffer;
+ unsigned char *buffer = NULL;
dev_dbg(&dev->pdev->dev, "start client msg\n");
if (!(dev->read_list.status == 0 &&
--
1.7.4.4
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
reply other threads:[~2011-06-15 21:46 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=1308174363-18876-1-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®