Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e74153d4 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (7547): em28xx: Fix a broken lock

parent f245e549
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -790,15 +790,12 @@ static int res_get(struct em28xx_fh *fh)
	if (fh->stream_on)
		return rc;

	mutex_lock(&dev->lock);

	if (dev->stream_on)
		rc = -EINVAL;
	else {
		return -EINVAL;

	mutex_lock(&dev->lock);
	dev->stream_on = 1;
	fh->stream_on  = 1;
	}

	mutex_unlock(&dev->lock);
	return rc;
}