diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/apollolake/gpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/gpio.c b/src/soc/intel/apollolake/gpio.c index ab0e0ed9a4..5a68878051 100644 --- a/src/soc/intel/apollolake/gpio.c +++ b/src/soc/intel/apollolake/gpio.c @@ -10,6 +10,7 @@ * (at your option) any later version. */ +#include <assert.h> #include <soc/gpio.h> #include <soc/iosf.h> @@ -37,6 +38,8 @@ static const struct pad_community *gpio_get_community(uint16_t pad) { const struct pad_community *map = gpio_communities; + assert(pad < TOTAL_PADS); + while (map->first_pad > pad) map++; |