diff --git a/arch/xtensa/src/esp32/esp32_cpuint.c b/arch/xtensa/src/esp32/esp32_cpuint.c index 718d7376f9..67eb0f0c2e 100644 --- a/arch/xtensa/src/esp32/esp32_cpuint.c +++ b/arch/xtensa/src/esp32/esp32_cpuint.c @@ -520,7 +520,7 @@ void esp32_free_cpuint(int cpuint) uint32_t *freeints; uint32_t bitmask; - DEBUGASSERT(cpuint >= 0 && cpuint < ESP32_CPUINT_NEDGEPERIPHS); + DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX); /* Mark the CPU interrupt as available */