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 2a2599c663
("[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: Jonathan Bakker <xc-racer2@live.ca>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
4e3991c1be
commit
e571f75b6b
@ -1235,8 +1235,11 @@ static int fimc_cap_streamoff(struct file *file, void *priv,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
media_pipeline_stop(&vc->ve.vdev.entity);
|
||||
vc->streaming = false;
|
||||
if (vc->streaming) {
|
||||
media_pipeline_stop(&vc->ve.vdev.entity);
|
||||
vc->streaming = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user