V4L/DVB (7547): em28xx: Fix a broken lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
@@ -790,15 +790,12 @@ static int res_get(struct em28xx_fh *fh)
|
|||||||
if (fh->stream_on)
|
if (fh->stream_on)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
mutex_lock(&dev->lock);
|
|
||||||
|
|
||||||
if (dev->stream_on)
|
if (dev->stream_on)
|
||||||
rc = -EINVAL;
|
return -EINVAL;
|
||||||
else {
|
|
||||||
dev->stream_on = 1;
|
|
||||||
fh->stream_on = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
mutex_lock(&dev->lock);
|
||||||
|
dev->stream_on = 1;
|
||||||
|
fh->stream_on = 1;
|
||||||
mutex_unlock(&dev->lock);
|
mutex_unlock(&dev->lock);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user