fix(esp_system): Handle failures correctly in esp_task_wdt_reconfigure()

- Failures were being masked as function always returned ESP_OK
- In the failure path the spinlock was not unlocked, so interrupts
  became permanently disabled.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2026-01-21 11:33:04 +11:00
committed by Omar Chebib
parent 3a093f6f11
commit d20510719a
+2 -2
View File
@@ -596,9 +596,9 @@ esp_err_t esp_task_wdt_reconfigure(const esp_task_wdt_config_t *config)
esp_task_wdt_impl_timer_restart(p_twdt_obj->impl_ctx);
}
portEXIT_CRITICAL(&spinlock);
err:
return ESP_OK;
portEXIT_CRITICAL(&spinlock);
return ret;
}
esp_err_t esp_task_wdt_stop(void)