Skip to content

Commit 9e9509e

Browse files
osctobelinusw
authored andcommitted
gpio: tegra: fix unbalanced chained_irq_enter/exit
When more than one GPIO IRQs are triggered simultaneously, tegra_gpio_irq_handler() called chained_irq_exit() multiple times for one chained_irq_enter(). Fixes: 3c92db9 Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> [Also changed the variable to a bool] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent df1e76f commit 9e9509e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio-tegra.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
360360
{
361361
int port;
362362
int pin;
363-
int unmasked = 0;
363+
bool unmasked = false;
364364
int gpio;
365365
u32 lvl;
366366
unsigned long sta;
@@ -384,8 +384,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
384384
* before executing the handler so that we don't
385385
* miss edges
386386
*/
387-
if (lvl & (0x100 << pin)) {
388-
unmasked = 1;
387+
if (!unmasked && lvl & (0x100 << pin)) {
388+
unmasked = true;
389389
chained_irq_exit(chip, desc);
390390
}
391391

0 commit comments

Comments
 (0)