mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-24 06:35:44 +08:00
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
@ -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 New Issue
Block a user