From 2d2c3eb2cf0711950198f7b835e8b8b8f3ffd65b Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:18:26 +0900 Subject: [PATCH] drivers/video: Initialize flags member of query control APIs video driver does not support flags member of ioctl(VIDIOC_QUERYCTRL) and ioctl(VIDIOC_QUERY_EXT_CTRL). But, ioctl returns with the flags member that has the garbage value. Add initialization of flags member to avoid return of the garbage value. --- drivers/video/video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/video.c b/drivers/video/video.c index b67fe7580d8..92a450a16ba 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -2157,6 +2157,7 @@ static int video_query_ext_ctrl(FAR struct video_mng_s *vmng, attr->maximum = vmng->video_scence_num - 1; attr->step = 1; attr->default_value = 0; + attr->flags = 0; strlcpy(attr->name, "Scene Mode", 32); } else @@ -2170,6 +2171,7 @@ static int video_query_ext_ctrl(FAR struct video_mng_s *vmng, } attr->type = value.type; + attr->flags = 0; switch (value.type) {