From: Laurent Pinchart Date: Sun, 6 Dec 2020 23:53:47 +0000 (+0100) Subject: media: ti-vpe: cal: Remove DMA queue empty check at start streaming time X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d7d24d772f2c56e32ce8beb1a05a04fe28e4d888;p=linux.git media: ti-vpe: cal: Remove DMA queue empty check at start streaming time The vb2 queue ensures that the start streaming operation will only be called with a minimal number of buffers queued to the driver. There's thus no need to manually check if the DMA queue is empty. Remove the check. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c index ad1e85189831b..bfc3ba4a96aff 100644 --- a/drivers/media/platform/ti-vpe/cal-video.c +++ b/drivers/media/platform/ti-vpe/cal-video.c @@ -511,12 +511,6 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) int ret; spin_lock_irq(&ctx->slock); - if (list_empty(&dma_q->active)) { - spin_unlock_irq(&ctx->slock); - ctx_dbg(3, ctx, "buffer queue is empty\n"); - return -EIO; - } - buf = list_entry(dma_q->active.next, struct cal_buffer, list); ctx->cur_frm = buf; ctx->next_frm = buf;