summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2019-09-20 14:05:48 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 13:34:06 +0100
commit7361bab5eba37027d5993add2ca6eed7a0870be5 (patch)
treea74b4b0503df954e57943f58eaa6dfa03bec8547 /drivers/media
parentc3bb807dfc80f1ef55543d5aecad0a4eaf335c89 (diff)
media: am437x-vpfe: Setting STD to current value is not an error
[ Upstream commit 13aa21cfe92ce9ebb51824029d89f19c33f81419 ] VIDIOC_S_STD should not return an error if the value is identical to the current one. This error was highlighted by the v4l2-compliance test. Signed-off-by: Benoit Parrot <bparrot@ti.com> Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/am437x/am437x-vpfe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 572bc043b62d..36add3c463f7 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -1847,6 +1847,10 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id)
if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD))
return -ENODATA;
+ /* if trying to set the same std then nothing to do */
+ if (vpfe_standards[vpfe->std_index].std_id == std_id)
+ return 0;
+
/* If streaming is started, return error */
if (vb2_is_busy(&vpfe->buffer_queue)) {
vpfe_err(vpfe, "%s device busy\n", __func__);