Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97215cbd authored by Magnus Damm's avatar Magnus Damm Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11029): video: use videobuf_waiton() in sh_mobile_ceu free_buffer()



Make sure videobuf_waiton() is used before freeing a buffer.
Without this fix we may return the buffer to the allocator
before the bus mastering operation is finished.

Reported-by: default avatarMatthieu CASTET <matthieu.castet@parrot.com>
Tested-by: default avatarKuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f340e3f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq,
	if (in_interrupt())
		BUG();

	videobuf_waiton(&buf->vb, 0, 0);
	videobuf_dma_contig_free(vq, &buf->vb);
	dev_dbg(&icd->dev, "%s freed\n", __func__);
	buf->vb.state = VIDEOBUF_NEEDS_INIT;