提交 e571f75b 编写于 作者: J Jonathan Bakker 提交者: Mauro Carvalho Chehab

media: exynos4-is: Handle duplicate calls to vidioc_streamoff

vidioc_streamoff can be called multiple times from userspace, but we
should only call media_pipeline_stop when we're actually setup.

This became more noticeable after commit 2a2599c6 ("[media] media:
entity: Catch unbalanced media_pipeline_stop calls") was merged as it
added a WARN for unbalanced calls to media_pipeline_stop.
Signed-off-by: NJonathan Bakker <xc-racer2@live.ca>
Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 4e3991c1
...@@ -1235,8 +1235,11 @@ static int fimc_cap_streamoff(struct file *file, void *priv, ...@@ -1235,8 +1235,11 @@ static int fimc_cap_streamoff(struct file *file, void *priv,
if (ret < 0) if (ret < 0)
return ret; return ret;
media_pipeline_stop(&vc->ve.vdev.entity); if (vc->streaming) {
vc->streaming = false; media_pipeline_stop(&vc->ve.vdev.entity);
vc->streaming = false;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册