summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-21 17:06:42 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:26 -0300
commit07f7db4ce7b29d431553b426e0dcb720c5297a4b (patch)
tree3fe2ce0195cd5e840268e30f4dda6c21265649b4 /drivers/media/video/em28xx
parent71bf2e08ce197ab7a92215cb4e08a68c755e32f9 (diff)
downloadblackbird-op-linux-07f7db4ce7b29d431553b426e0dcb720c5297a4b.tar.gz
blackbird-op-linux-07f7db4ce7b29d431553b426e0dcb720c5297a4b.zip
V4L/DVB (10291): em28xx: fix VIDIOC_G_CTRL when there is no msp34xx device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 8e61b2ca9167..d8b45b5ee041 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1008,8 +1008,13 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
if (dev->board.has_msp34xx)
em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
- else
+ else {
rc = em28xx_get_ctrl(dev, ctrl);
+ if (rc < 0) {
+ em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
+ rc = 0;
+ }
+ }
mutex_unlock(&dev->lock);
return rc;
OpenPOWER on IntegriCloud