From f94035ad8554cccb3aa507a11629bc914b6dd451 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 10 Sep 2021 20:55:01 +0200 Subject: [PATCH] spi_flash: state that esp_partition_iterator_release allows NULL arg The implementation allows passing the NULL argument, and the function is used in the examples accordingly. Fix the discrepancy in the doxygen comment. Closes https://github.com/espressif/esp-idf/issues/7545 --- components/spi_flash/include/esp_partition.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/spi_flash/include/esp_partition.h b/components/spi_flash/include/esp_partition.h index 36baea2986..550bf6b6b2 100644 --- a/components/spi_flash/include/esp_partition.h +++ b/components/spi_flash/include/esp_partition.h @@ -181,7 +181,9 @@ esp_partition_iterator_t esp_partition_next(esp_partition_iterator_t iterator); /** * @brief Release partition iterator * - * @param iterator Iterator obtained using esp_partition_find. Must be non-NULL. + * @param iterator Iterator obtained using esp_partition_find. + * The iterator is allowed to be NULL, so it is not necessary to check its value + * before calling this function. * */ void esp_partition_iterator_release(esp_partition_iterator_t iterator);