Skip to content

Commit

Permalink
media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1
Browse files Browse the repository at this point in the history
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: fb582cb ("media: v4l2-ctrls: add support for dynamically allocated arrays.")
Reported-by: Alice Yuan <alice.yuan@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
  • Loading branch information
Hans Verkuil authored and mchehab committed Dec 14, 2022
1 parent cdb9d35 commit 73278d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/v4l2-core/v4l2-ctrls-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static int user_to_new(struct v4l2_ext_control *c, struct v4l2_ctrl *ctrl)
* then return an error.
*/
if (strlen(ctrl->p_new.p_char) == ctrl->maximum && last)
ctrl->is_new = 1;
return -ERANGE;
}
return ret;
Expand Down

0 comments on commit 73278d4

Please sign in to comment.