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

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

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f245e549
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment