diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-06-10 07:58:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-30 21:32:58 -0400 |
commit | afdea8bac5e80362459940e18e705d792e677a57 (patch) | |
tree | d51d08685cb146d0958daa5c951f7940759b093c /drivers/media | |
parent | bf7b73efb7f52abf56b512546c3bbc35001dd696 (diff) |
[media] media: vb2: reset queued_count value during queue reinitialization
queued_count variable was left untouched during the queue reinitialization
in __vb2_queue_cancel, what might lead to mismatch between the real number
of queued buffers and queued_count variable.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/videobuf2-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 6489aa26e788..84f03b25aedb 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c | |||
@@ -1189,6 +1189,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q) | |||
1189 | * has not already dequeued before initiating cancel. | 1189 | * has not already dequeued before initiating cancel. |
1190 | */ | 1190 | */ |
1191 | INIT_LIST_HEAD(&q->done_list); | 1191 | INIT_LIST_HEAD(&q->done_list); |
1192 | atomic_set(&q->queued_count, 0); | ||
1192 | wake_up_all(&q->done_wq); | 1193 | wake_up_all(&q->done_wq); |
1193 | 1194 | ||
1194 | /* | 1195 | /* |