Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754508AbcCMXKB (ORCPT ); Sun, 13 Mar 2016 19:10:01 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:44301 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463AbcCMXJw (ORCPT ); Sun, 13 Mar 2016 19:09:52 -0400 Subject: Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler To: Dan Carpenter References: <20160311081139.GC31887@mwanda> CC: Lee Jones , , From: "Kim, Milo" Message-ID: <56E5F2FC.5070801@ti.com> Date: Mon, 14 Mar 2016 08:08:44 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20160311081139.GC31887@mwanda> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 27 On 3/11/2016 5:11 PM, Dan Carpenter wrote: > Instead to being true/false, the "handled" is true/uninitialized. > Presumably this doesn't cause that many problems in real life because > normally we handle the IRQ. > > Fixes: eea6b7cc53aa ('mfd: Add lp8788 mfd driver') > Signed-off-by: Dan Carpenter Acked-by: Milo Kim Thanks for catching this! > > diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c > index c7a9825..792d51b 100644 > --- a/drivers/mfd/lp8788-irq.c > +++ b/drivers/mfd/lp8788-irq.c > @@ -112,7 +112,7 @@ static irqreturn_t lp8788_irq_handler(int irq, void *ptr) > struct lp8788_irq_data *irqd = ptr; > struct lp8788 *lp = irqd->lp; > u8 status[NUM_REGS], addr, mask; > - bool handled; > + bool handled = false; > int i; > > if (lp8788_read_multi_bytes(lp, LP8788_INT_1, status, NUM_REGS)) >