From 52ef5c80729b6a85c67bb38863f09abab7049539 Mon Sep 17 00:00:00 2001 From: hebinglin Date: Fri, 1 Aug 2025 17:08:05 +0800 Subject: [PATCH] fix(esp_hw_support): change if condition to fix idf-13103 --- components/esp_hw_support/sleep_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index cf90f79113..d5e99cb43e 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -2540,7 +2540,7 @@ int32_t* esp_sleep_sub_mode_dump_config(FILE *stream) { #if SOC_PM_SUPPORT_PMU_CLK_ICG esp_err_t esp_sleep_clock_config(esp_sleep_clock_t clock, esp_sleep_clock_option_t option) { - if (clock > ESP_SLEEP_CLOCK_MAX || option > ESP_SLEEP_CLOCK_OPTION_UNGATE) { + if (clock >= ESP_SLEEP_CLOCK_MAX || option >= ESP_SLEEP_CLOCK_OPTION_MAX) { return ESP_ERR_INVALID_ARG; }