[media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 3 Feb 2016 21:30:31 +0000 (19:30 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 4 Feb 2016 11:15:51 +0000 (09:15 -0200)
changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data
and vb2_thread") broke videobuf2-dvb.

The root cause is that, instead of calling threadio->fnc() for
all types of events except for VB2_BUF_STATE_ERROR, it was calling
it only for VB2_BUF_STATE_DONE.

With that, the DVB thread were never called.

Cc: stable@vger.kernel.org # Kernel >= 4.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-core.c

index b53e42c329cb2bc61ab3912f3477f07a11d95cf1..ff8953ae52d142e654f30548d5ddf7bf08c45690 100644 (file)
@@ -2742,7 +2742,7 @@ static int vb2_thread(void *data)
                        break;
                try_to_freeze();
 
-               if (vb->state == VB2_BUF_STATE_DONE)
+               if (vb->state != VB2_BUF_STATE_ERROR)
                        if (threadio->fnc(vb, threadio->priv))
                                break;
                call_void_qop(q, wait_finish, q);