Commit 07f7db4c authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10291): em28xx: fix VIDIOC_G_CTRL when there is no msp34xx device.

parent 71bf2e08
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;