Commit 078dc65e authored by Axel Lin's avatar Axel Lin Committed by Grant Likely

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 3ffc9ceb
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment