V4L/DVB (7547): em28xx: Fix a broken lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
f245e549f0
commit
e74153d44a
1 changed files with 4 additions and 7 deletions
|
@ -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 {
|
||||
dev->stream_on = 1;
|
||||
fh->stream_on = 1;
|
||||
}
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&dev->lock);
|
||||
dev->stream_on = 1;
|
||||
fh->stream_on = 1;
|
||||
mutex_unlock(&dev->lock);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue