aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-06 20:37:43 +0800
committerGrant Likely <grant.likely@secretlab.ca>2012-04-10 14:20:55 -0600
commit078dc65e61c562e289685fe43b5ef58118e033fc (patch)
tree59bc3c9d689ed27ce41e57eebe4f3dc9dc69e086 /drivers/gpio
parent3ffc9cebb65f6942cd912e33e60e1f09e497e208 (diff)
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')
-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 9ad1703d140..ae5d7f12ce6 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];