From: Tomas Winkler Date: Wed, 15 Jun 2011 21:46:03 +0000 (+0300) Subject: staging: mei: fix possible usage of uninitialized variable X-Git-Tag: MMI-PSA29.97-13-9~18845^2~534 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=479bc59d88e1126f3206923738d990ebe1b41137;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: mei: fix possible usage of uninitialized variable 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c index 2ff30ee90588..9cb186bf1874 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 &&