From c8868b374573ed90f84065e393b8761159401d15 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 5 Dec 2022 03:27:48 +0800 Subject: [PATCH] drivers/video: Return 0 in case g_video_sensor_ops or get_supported_value is NULL Signed-off-by: Xiang Xiao --- drivers/video/video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/video.c b/drivers/video/video.c index c797e3e1bb..69adee9a68 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -779,7 +779,9 @@ static int32_t get_default_value(uint32_t id) if ((g_video_sensor_ops == NULL) || (g_video_sensor_ops->get_supported_value == NULL)) { - return -EINVAL; + /* Don't care(unsupported parameter) */ + + return 0; } ret = g_video_sensor_ops->get_supported_value(id, &value);