From 479bc59d88e1126f3206923738d990ebe1b41137 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Thu, 16 Jun 2011 00:46:03 +0300 Subject: [PATCH] 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 --- drivers/staging/mei/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 && -- 2.39.5