提交 e74153d4 编写于 作者: M Mauro Carvalho Chehab

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

Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 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 {
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册