From ec5f7d63440983d4e557d749586941b168e0d505 Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Mon, 22 Oct 2018 20:46:14 +0800 Subject: [PATCH] esp32: do not try to load PHY data if fail to open NVS --- components/esp32/phy_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp32/phy_init.c b/components/esp32/phy_init.c index f435db3b77..9fdcf75c0e 100644 --- a/components/esp32/phy_init.c +++ b/components/esp32/phy_init.c @@ -187,6 +187,7 @@ esp_err_t esp_phy_load_cal_data_from_nvs(esp_phy_calibration_data_t* out_cal_dat if (err == ESP_ERR_NVS_NOT_INITIALIZED) { ESP_LOGE(TAG, "%s: NVS has not been initialized. " "Call nvs_flash_init before starting WiFi/BT.", __func__); + return err; } else if (err != ESP_OK) { ESP_LOGD(TAG, "%s: failed to open NVS namespace (0x%x)", __func__, err); return err;