summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-12-12 08:32:20 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-31 13:32:54 +0100
commita44053cf3b9c8e4c78929c348a1c34978d19e7b3 (patch)
tree4b780a6752096773d578e71e0f087f77708be1e2 /drivers/media/v4l2-core
parent6a1504dd36cd9a0a69250d61da8bdb17b29f1fe8 (diff)
downloadlinux-stable-a44053cf3b9c8e4c78929c348a1c34978d19e7b3.tar.gz
linux-stable-a44053cf3b9c8e4c78929c348a1c34978d19e7b3.tar.bz2
linux-stable-a44053cf3b9c8e4c78929c348a1c34978d19e7b3.zip
media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1
[ Upstream commit 73278d483378cf850ade923a1107a70297b2602a ] 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: fb582cba4492 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls-api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-api.c b/drivers/media/v4l2-core/v4l2-ctrls-api.c
index d0a3aa3806fb..3d3b6dc24ca6 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-api.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-api.c
@@ -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;