提交 ab0ab190 编写于 作者: M Mats Randgaard 提交者: Mauro Carvalho Chehab

[media] TVP7002: Return V4L2_DV_INVALID if any of the errors occur

Signed-off-by: NMats Randgaard <mats.randgaard@tandberg.com>
Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 699cc196
......@@ -687,6 +687,9 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
u8 cpl_msb;
int index;
/* Return invalid preset if no active input is detected */
qpreset->preset = V4L2_DV_INVALID;
device = to_tvp7002(sd);
/* Read standards from device registers */
......@@ -720,8 +723,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
if (index == NUM_PRESETS) {
v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
lpfr, cpln);
/* Could not detect a signal, so return the 'invalid' preset */
qpreset->preset = V4L2_DV_INVALID;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册