diff options
Diffstat (limited to 'chip/lm4/gpio.c')
-rw-r--r-- | chip/lm4/gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index 38b5e7ed46..7bed71bbc6 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -47,8 +47,9 @@ void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func) int port_index = find_gpio_port_index(port); int cgmask; + /* Ignore (do nothing for) invalid port values */ if (port_index < 0) - return; /* TODO: assert */ + return; /* Enable the GPIO port in run and sleep. */ cgmask = 1 << port_index; |