diff --git a/cpu/esp32/periph/can.c b/cpu/esp32/periph/can.c index d38b3da7e6..c9285e5390 100644 --- a/cpu/esp32/periph/can.c +++ b/cpu/esp32/periph/can.c @@ -786,9 +786,9 @@ static void IRAM_ATTR _esp_can_intr_handler(void *arg) DEBUG("%s error passive interrupt %d %d\n", __func__, CAN.tx_error_counter_reg.byte, CAN.rx_error_counter_reg.byte); + /* save the event */ + dev->events |= ESP_CAN_EVENT_ERROR_PASSIVE; } - /* save the event */ - dev->events |= ESP_CAN_EVENT_ERROR_PASSIVE; } /*