From 8fdfb745d62957a4f3f1a53a19cf299798f3201e Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Sun, 14 Jun 2020 15:41:57 +0200 Subject: [PATCH] drivers: video: fix uninitialized variables Fix the build error by initializing the variables before we perform th querry for the ext control. Signed-off-by: Alin Jerpelea --- drivers/video/video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/video/video.c b/drivers/video/video.c index 2be15304b8..922c64ca8f 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -1035,8 +1035,14 @@ static int video_queryctrl(FAR struct v4l2_queryctrl *ctrl) /* Replace to VIDIOC_QUERY_EXT_CTRL format */ - ext_ctrl.ctrl_class = ctrl->ctrl_class; - ext_ctrl.id = ctrl->id; + ext_ctrl.ctrl_class = ctrl->ctrl_class; + ext_ctrl.id = ctrl->id; + ext_ctrl.type = ctrl->type; + ext_ctrl.minimum = ctrl->minimum; + ext_ctrl.maximum = ctrl->maximum; + ext_ctrl.step = ctrl->step; + ext_ctrl.default_value = ctrl->default_value; + ext_ctrl.flags = ctrl->flags; ret = video_query_ext_ctrl(&ext_ctrl);