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-04-02 09:46:57 +08:00
committed by Omar Chebib
parent 9c4bbcdace
commit da72ecc3c2
+2 -2
View File
@@ -594,9 +594,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)