diff mbox

[2/2] v4l: videobuf: Add support for V4L2_BUF_FLAG_ERROR

Message ID 1268836190-31051-3-git-send-email-p.osciak@samsung.com (mailing list archive)
State Superseded
Headers show

Commit Message

Pawel Osciak March 17, 2010, 2:29 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index e93672a..aa361d3 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -286,8 +286,10 @@  static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b,
 	case VIDEOBUF_ACTIVE:
 		b->flags |= V4L2_BUF_FLAG_QUEUED;
 		break;
-	case VIDEOBUF_DONE:
 	case VIDEOBUF_ERROR:
+		b->flags |= V4L2_BUF_FLAG_ERROR;
+		/* fall through */
+	case VIDEOBUF_DONE:
 		b->flags |= V4L2_BUF_FLAG_DONE;
 		break;
 	case VIDEOBUF_NEEDS_INIT:
@@ -679,7 +681,6 @@  int videobuf_dqbuf(struct videobuf_queue *q,
 	switch (buf->state) {
 	case VIDEOBUF_ERROR:
 		dprintk(1, "dqbuf: state is error\n");
-		retval = -EIO;
 		CALL(q, sync, q, buf);
 		buf->state = VIDEOBUF_IDLE;
 		break;