OSDN Git Service

Merge git://git.linuxtv.org/media_stage into media_tree
[tomoyo/tomoyo-test1.git] / drivers / media / common / videobuf2 / videobuf2-core.c
index cab07e3..cf6727d 100644 (file)
@@ -2130,8 +2130,6 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
        if (ret)
                return ret;
 
-       q->streaming = 1;
-
        /*
         * Tell driver to start streaming provided sufficient buffers
         * are available.
@@ -2142,12 +2140,13 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
                        goto unprepare;
        }
 
+       q->streaming = 1;
+
        dprintk(q, 3, "successful\n");
        return 0;
 
 unprepare:
        call_void_qop(q, unprepare_streaming, q);
-       q->streaming = 0;
        return ret;
 }
 EXPORT_SYMBOL_GPL(vb2_core_streamon);