public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Axel Lin <axel.lin@gmail.com>, linux-kernel@vger.kernel.org
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>,
	Linus Walleij <linus.walleij@stericsson.com>
Subject: Re: [PATCH] gpio: Fix uninitialized variable bit in adp5588_irq_handler
Date: Fri, 06 Apr 2012 15:48:11 -0700	[thread overview]
Message-ID: <20120406224811.5630A3E0F0A@localhost> (raw)
In-Reply-To: <1333715863.17459.4.camel@phoenix>

On Fri, 06 Apr 2012 20:37:43 +0800, Axel Lin <axel.lin@gmail.com> wrote:
> The variable 'bit' is uninitialized in the first iteration of for loop. Fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied, and will merge for v3.4.  THanks.

g.

> ---
>  drivers/gpio/gpio-adp5588.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
> index 9ad1703..ae5d7f1 100644
> --- a/drivers/gpio/gpio-adp5588.c
> +++ b/drivers/gpio/gpio-adp5588.c
> @@ -252,7 +252,7 @@ static irqreturn_t adp5588_irq_handler(int irq, void *devid)
>  		if (ret < 0)
>  			memset(dev->irq_stat, 0, ARRAY_SIZE(dev->irq_stat));
>  
> -		for (bank = 0; bank <= ADP5588_BANK(ADP5588_MAXGPIO);
> +		for (bank = 0, bit = 0; bank <= ADP5588_BANK(ADP5588_MAXGPIO);
>  			bank++, bit = 0) {
>  			pending = dev->irq_stat[bank] & dev->irq_mask[bank];
>  
> -- 
> 1.7.5.4
> 
> 
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

      reply	other threads:[~2012-04-07  1:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 12:37 [PATCH] gpio: Fix uninitialized variable bit in adp5588_irq_handler Axel Lin
2012-04-06 22:48 ` Grant Likely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120406224811.5630A3E0F0A@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=axel.lin@gmail.com \
    --cc=hennerich@blackfin.uclinux.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox