From 77424e473fd1f47caf6b9e5621defc4bab51468a Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 12 Sep 2019 14:48:50 +0200 Subject: chip/nrf51/gpio.c: Actually check the flag (instead of == 0) Found by Coverity Scan #146623 BUG=none BRANCH=none TEST=none Change-Id: I04ca143f794596c7be00f69ee297b33759125ae2 Signed-off-by: Patrick Georgi Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1801204 Reviewed-by: Daisuke Nojiri Tested-by: Patrick Georgi Commit-Queue: Patrick Georgi --- chip/nrf51/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/nrf51/gpio.c b/chip/nrf51/gpio.c index 9d6067bb70..48c9f39895 100644 --- a/chip/nrf51/gpio.c +++ b/chip/nrf51/gpio.c @@ -257,7 +257,7 @@ int gpio_disable_interrupt(enum gpio_signal signal) return EC_ERROR_INVAL; /* If it's not shared, use INT0-INT3, otherwise use PORT. */ - if (!(g->flags && GPIO_INT_SHARED)) { + if (!(g->flags & GPIO_INT_SHARED)) { for (i = 0; i < NRF51_GPIOTE_IN_COUNT; i++) { /* Remove matching handler. */ if (gpio_ints[i] == g) { -- cgit v1.2.1