aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorPawel Osciak <pawel@osciak.com>2011-03-20 18:26:41 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 03:55:08 -0400
commit5db2c3ba4de8489a7a064bac463bb8af2c7a1ae4 (patch)
treed1dbaabc2a6133ca962ed90e3af8dd0e94488702 /drivers/media/video
parent4ffabdb35ad59fdb8cb6ad3ff4733694ff0dfc35 (diff)
[media] vb2: Handle return value from start_streaming callback
Fix vb2 not handling return value from start_streaming() callback. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/videobuf2-core.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index 8c6f04bc4d89..6698c77e0f64 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -1111,6 +1111,7 @@ EXPORT_SYMBOL_GPL(vb2_dqbuf);
1111int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type) 1111int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
1112{ 1112{
1113 struct vb2_buffer *vb; 1113 struct vb2_buffer *vb;
1114 int ret;
1114 1115
1115 if (q->fileio) { 1116 if (q->fileio) {
1116 dprintk(1, "streamon: file io in progress\n"); 1117 dprintk(1, "streamon: file io in progress\n");
@@ -1138,12 +1139,16 @@ int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
1138 } 1139 }
1139 } 1140 }
1140 1141
1141 q->streaming = 1;
1142
1143 /* 1142 /*
1144 * Let driver notice that streaming state has been enabled. 1143 * Let driver notice that streaming state has been enabled.
1145 */ 1144 */
1146 call_qop(q, start_streaming, q); 1145 ret = call_qop(q, start_streaming, q);
1146 if (ret) {
1147 dprintk(1, "streamon: driver refused to start streaming\n");
1148 return ret;
1149 }
1150
1151 q->streaming = 1;
1147 1152
1148 /* 1153 /*
1149 * If any buffers were queued before streamon, 1154 * If any buffers were queued before streamon,