summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvp7002.c
diff options
context:
space:
mode:
authorMats Randgaard <mats.randgaard@tandberg.com>2010-08-03 04:18:03 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-22 10:25:14 -0300
commitab0ab19032d16ad63e81f2fe98ae35d76296d8d9 (patch)
tree32588b1c9c84ab31291583e9a9bf7f250351f3b9 /drivers/media/video/tvp7002.c
parent699cc1962c85351689c27dd46e598e4204fdd105 (diff)
downloadblackbird-op-linux-ab0ab19032d16ad63e81f2fe98ae35d76296d8d9.tar.gz
blackbird-op-linux-ab0ab19032d16ad63e81f2fe98ae35d76296d8d9.zip
[media] TVP7002: Return V4L2_DV_INVALID if any of the errors occur
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvp7002.c')
-rw-r--r--drivers/media/video/tvp7002.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index b799851bf3d0..d78be2f710e5 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -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;
}
OpenPOWER on IntegriCloud