Skip to content
Snippets Groups Projects
Commit 1af5fa17 authored by Daniel Leung's avatar Daniel Leung Committed by Andrew Boie
Browse files

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: default avatarDaniel Leung <daniel.leung@intel.com>
parent ca3b6c68
No related branches found
No related tags found
No related merge requests found
...@@ -243,7 +243,7 @@ static int gpio_intel_apl_config(struct device *dev, int access_op, ...@@ -243,7 +243,7 @@ static int gpio_intel_apl_config(struct device *dev, int access_op,
/* setup interrupt if desired */ /* setup interrupt if desired */
if (flags & GPIO_INT) { if (flags & GPIO_INT) {
/* invert signal for interrupt controller */ /* 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; cfg0 |= PAD_CFG0_RXINV;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment