From 1af5fa174b4b8b24e299606bb6ecc2ea16989a8c Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 27 Feb 2019 15:15:30 -0800 Subject: [PATCH] gpio: gpio_intel_apl: fix if condition leading to dead code GPIO_INT_ACTIVE_LOW is 0 which means it cannot be simply AND-ed. So fix the condition. Fixes #13880 Signed-off-by: Daniel Leung --- drivers/gpio/gpio_intel_apl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio_intel_apl.c b/drivers/gpio/gpio_intel_apl.c index 3b1e9e22c5..a5cf525c81 100644 --- a/drivers/gpio/gpio_intel_apl.c +++ b/drivers/gpio/gpio_intel_apl.c @@ -243,7 +243,7 @@ static int gpio_intel_apl_config(struct device *dev, int access_op, /* setup interrupt if desired */ if (flags & GPIO_INT) { /* invert signal for interrupt controller */ - if (flags & GPIO_INT_ACTIVE_LOW) { + if ((flags & GPIO_INT_ACTIVE_HIGH) == GPIO_INT_ACTIVE_LOW) { cfg0 |= PAD_CFG0_RXINV; }