提交 73278d48 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1

The patch adding support for dynamically allocated arrays accidentally
dropped the line setting ctrl->is_new to 1, thus new string values were
always ignored.

Fixes: fb582cba ("media: v4l2-ctrls: add support for dynamically allocated arrays.")
Reported-by: NAlice Yuan <alice.yuan@nxp.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 cdb9d353
...@@ -150,6 +150,7 @@ static int user_to_new(struct v4l2_ext_control *c, struct v4l2_ctrl *ctrl) ...@@ -150,6 +150,7 @@ static int user_to_new(struct v4l2_ext_control *c, struct v4l2_ctrl *ctrl)
* then return an error. * then return an error.
*/ */
if (strlen(ctrl->p_new.p_char) == ctrl->maximum && last) if (strlen(ctrl->p_new.p_char) == ctrl->maximum && last)
ctrl->is_new = 1;
return -ERANGE; return -ERANGE;
} }
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册