summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-adp5588.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-06 14:37:43 +0200
committerGrant Likely <grant.likely@secretlab.ca>2012-04-10 22:20:55 +0200
commit078dc65e61c562e289685fe43b5ef58118e033fc (patch)
tree59bc3c9d689ed27ce41e57eebe4f3dc9dc69e086 /drivers/gpio/gpio-adp5588.c
parentgpio/sodaville: Convert sodaville driver to new irqdomain API (diff)
downloadlinux-078dc65e61c562e289685fe43b5ef58118e033fc.tar.xz
linux-078dc65e61c562e289685fe43b5ef58118e033fc.zip
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/gpio/gpio-adp5588.c')
-rw-r--r--drivers/gpio/gpio-adp5588.c2
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];