Skip to content

Commit ee64c9c

Browse files
authored
Merge pull request #6021 from andrewleech/gpiote_uninit
nrf5x: fix array overflow in gpio configuration code
2 parents bf2f24f + f639777 commit ee64c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/gpio_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void gpiote_pin_uninit(uint8_t pin)
112112
if ((m_gpio_cfg[pin].direction == PIN_OUTPUT) && (!m_gpio_cfg[pin].used_as_irq)) {
113113
nrf_drv_gpiote_out_uninit(pin);
114114
}
115-
else {
115+
else if (m_gpio_cfg[pin].used_as_irq) {
116116
nrf_drv_gpiote_in_uninit(pin);
117117
}
118118
}

0 commit comments

Comments
 (0)