summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vim2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/vim2m.c')
-rw-r--r--drivers/media/platform/vim2m.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index 98be92a4e0b0..04250adf58e0 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -905,7 +905,9 @@ static void vim2m_stop_streaming(struct vb2_queue *q)
struct vb2_v4l2_buffer *vbuf;
unsigned long flags;
- cancel_delayed_work_sync(&ctx->work_run);
+ if (v4l2_m2m_get_curr_priv(dev->m2m_dev) == ctx)
+ cancel_delayed_work_sync(&dev->work_run);
+
for (;;) {
if (V4L2_TYPE_IS_OUTPUT(q->type))
vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);