diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-06 16:37:43 +0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-04-11 00:20:55 +0400 |
commit | 078dc65e61c562e289685fe43b5ef58118e033fc (patch) | |
tree | 59bc3c9d689ed27ce41e57eebe4f3dc9dc69e086 /drivers | |
parent | 3ffc9cebb65f6942cd912e33e60e1f09e497e208 (diff) | |
download | linux-078dc65e61c562e289685fe43b5ef58118e033fc.tar.xz |
gpio: Fix uninitialized variable bit in adp5588_irq_handler
The variable 'bit' is uninitialized in the first iteration of for
loop. Fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 9ad1703d1408..ae5d7f12ce66 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]; |