Merge branch 'bugfix/esp_task_wdt_v6.0' into 'release/v6.0'

fix(esp_system): Handle failures correctly in esp_task_wdt_reconfigure() (backport v6.0)

See merge request espressif/esp-idf!45897
This commit is contained in:
Jiang Jiang Jian
2026-03-23 11:22:04 +08:00
2 changed files with 3 additions and 3 deletions
+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)
@@ -126,7 +126,7 @@ esp_err_t esp_task_wdt_impl_timer_stop(twdt_ctx_t obj)
ret = ESP_ERR_INVALID_STATE;
}
if (ret == ESP_OK) {
if (ret == ESP_OK && esp_timer_is_active(ctx->sw_timer)) {
ret = esp_timer_stop(ctx->sw_timer);
}