aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index bc08a829bc13..cc16e76a2493 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -3230,18 +3230,13 @@ int vb2_thread_stop(struct vb2_queue *q)
3230 3230
3231 if (threadio == NULL) 3231 if (threadio == NULL)
3232 return 0; 3232 return 0;
3233 call_void_qop(q, wait_finish, q);
3234 threadio->stop = true; 3233 threadio->stop = true;
3235 vb2_internal_streamoff(q, q->type); 3234 /* Wake up all pending sleeps in the thread */
3236 call_void_qop(q, wait_prepare, q); 3235 vb2_queue_error(q);
3237 err = kthread_stop(threadio->thread); 3236 err = kthread_stop(threadio->thread);
3238 q->fileio = NULL; 3237 __vb2_cleanup_fileio(q);
3239 fileio->req.count = 0;
3240 vb2_reqbufs(q, &fileio->req);
3241 kfree(fileio);
3242 threadio->thread = NULL; 3238 threadio->thread = NULL;
3243 kfree(threadio); 3239 kfree(threadio);
3244 q->fileio = NULL;
3245 q->threadio = NULL; 3240 q->threadio = NULL;
3246 return err; 3241 return err;
3247} 3242}