Skip to content

Commit

Permalink
staging: mei: fix possible usage of uninitialized variable
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent 0288c7c commit 479bc59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 479bc59

Please sign in to comment.