This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 92e72f8624feb70fa49cdd464eff9fd78f0c9854 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Mon Dec 5 03:33:33 2022 +0800 drivers/video: Return zero if gamma curve isn't supported in initialize_scene_gamma Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- drivers/video/video.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/video.c b/drivers/video/video.c index 69adee9a68..2adaf5250e 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -824,7 +824,7 @@ static int32_t initialize_scene_gamma(uint8_t **gamma) if ((g_video_sensor_ops->get_supported_value == NULL) || (g_video_sensor_ops->get_value == NULL)) { - return -ENOTTY; + return 0; } ret = g_video_sensor_ops->get_supported_value @@ -833,7 +833,7 @@ static int32_t initialize_scene_gamma(uint8_t **gamma) { /* Unsupported parameter */ - return -EINVAL; + return 0; } switch (sup_val.type) @@ -844,7 +844,7 @@ static int32_t initialize_scene_gamma(uint8_t **gamma) { /* Multiplication overflow */ - return -EINVAL; + return 0; } break; @@ -855,7 +855,7 @@ static int32_t initialize_scene_gamma(uint8_t **gamma) { /* Multiplication overflow */ - return -EINVAL; + return 0; } break; @@ -866,7 +866,7 @@ static int32_t initialize_scene_gamma(uint8_t **gamma) { /* Multiplication overflow */ - return -EINVAL; + return 0; } break;