From 263af74861b55b3039b3ac8b8dd9ad867b063773 Mon Sep 17 00:00:00 2001 From: Christopher Nadler Date: Sat, 16 Nov 2024 05:44:49 +0100 Subject: [PATCH] Fixes missing return error code validation during camera initialization --- driver/cam_hal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/cam_hal.c b/driver/cam_hal.c index f5ca22e61d..86b430aa72 100644 --- a/driver/cam_hal.c +++ b/driver/cam_hal.c @@ -362,7 +362,8 @@ esp_err_t cam_config(const camera_config_t *config, framesize_t frame_size, uint esp_err_t ret = ESP_OK; ret = ll_cam_set_sample_mode(cam_obj, (pixformat_t)config->pixel_format, config->xclk_freq_hz, sensor_pid); - + CAM_CHECK_GOTO(ret == ESP_OK, "ll_cam_set_sample_mode failed", err); + cam_obj->jpeg_mode = config->pixel_format == PIXFORMAT_JPEG; #if CONFIG_IDF_TARGET_ESP32 cam_obj->psram_mode = false;