Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755526AbcCULza (ORCPT ); Mon, 21 Mar 2016 07:55:30 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38162 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755407AbcCULzD (ORCPT ); Mon, 21 Mar 2016 07:55:03 -0400 Date: Mon, 21 Mar 2016 11:54:57 +0000 From: Lee Jones To: Dan Carpenter Cc: Milo Kim , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler Message-ID: <20160321115457.GH4140@x1> References: <20160311081139.GC31887@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160311081139.GC31887@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1300 Lines: 39 On Fri, 11 Mar 2016, 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 I've fixed the $SUBJECT line to be more consistent with the subsystem style for you this time. Please pay more attention to that in the future. `git log --oneline -- $SUBSYSTEM` helps with this. [I think I recall a conversation with you about this before, and you said it was part of your submission process?] Patch applied, thanks. > 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)) -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog