Skip to content

Commit

Permalink
media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line
Browse files Browse the repository at this point in the history
[ Upstream commit a155070 ]

The patch that fixed string control support somehow got mangled when it was
merged in mainline: the added line ended up in the wrong place.

Fix this.

Fixes: 73278d4 ("media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Hans Verkuil authored and gregkh committed Feb 9, 2023
1 parent d5c7a2a commit 7715f96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/v4l2-core/v4l2-ctrls-api.c
Expand Up @@ -150,8 +150,8 @@ 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;
ctrl->is_new = 1;
}
return ret;
default:
Expand Down

0 comments on commit 7715f96

Please sign in to comment.