Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
gpio: Fix uninitialized variable bit in adp5588_irq_handler
Browse files Browse the repository at this point in the history
The variable 'bit' is uninitialized in the first iteration of for
loop. Fix it.

Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
AxelLin authored and glikely committed Apr 10, 2012
1 parent 3ffc9ce commit 078dc65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-adp5588.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 078dc65

Please sign in to comment.