summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-21 21:06:42 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-01-21 21:06:42 +0100
commite7ada1bf7bbfdee58d7637d9716fdd8d8b76e4a7 (patch)
tree535ef0976bc1e37cfaade53431663b98e3aa6bb3
parent12c75e941b4f671e044778ccdeafd4efc106b7e7 (diff)
downloadmediapointer-dvb-s2-e7ada1bf7bbfdee58d7637d9716fdd8d8b76e4a7.tar.gz
mediapointer-dvb-s2-e7ada1bf7bbfdee58d7637d9716fdd8d8b76e4a7.tar.bz2
em28xx: fix VIDIOC_G_CTRL when there is no msp34xx device.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 37577a670..58a16fe8f 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -1018,8 +1018,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;