From e7ada1bf7bbfdee58d7637d9716fdd8d8b76e4a7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 21 Jan 2009 21:06:42 +0100 Subject: em28xx: fix VIDIOC_G_CTRL when there is no msp34xx device. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/em28xx/em28xx-video.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media') 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; -- cgit v1.2.3