diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-11 11:39:05 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-11 11:39:05 +0200 |
commit | c289e1f52dba91a87e71568b1be8552abf3b1b14 (patch) | |
tree | ddab7c16c5a4a2ca101a782b8d2c2425a16951fa /linux | |
parent | 10bf955c171dcee7ace70597f3134fe65ced4b1f (diff) | |
download | mediapointer-dvb-s2-c289e1f52dba91a87e71568b1be8552abf3b1b14.tar.gz mediapointer-dvb-s2-c289e1f52dba91a87e71568b1be8552abf3b1b14.tar.bz2 |
ivtv: yuv write() error handling tweak
From: Ian Armstrong <ian@iarmst.demon.co.uk>
Modifies behaviour of a failed dma write() operation for the yuv device.
If the dma transfer for the yuv device fails, the write() operation will now
exit immediately.
Priority: normal
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-fileops.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-fileops.c b/linux/drivers/media/video/ivtv/ivtv-fileops.c index b7457fc60..1c404e454 100644 --- a/linux/drivers/media/video/ivtv/ivtv-fileops.c +++ b/linux/drivers/media/video/ivtv/ivtv-fileops.c @@ -600,13 +600,14 @@ retry: since we may get here before the stream has been fully set-up */ if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { while (count >= itv->dma_data_req_size) { - if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) { - bytes_written += itv->dma_data_req_size; - user_buf += itv->dma_data_req_size; - count -= itv->dma_data_req_size; - } else { - break; - } + rc = ivtv_yuv_udma_stream_frame(itv, (void __user *)user_buf); + + if (rc < 0) + return rc; + + bytes_written += itv->dma_data_req_size; + user_buf += itv->dma_data_req_size; + count -= itv->dma_data_req_size; } if (count == 0) { IVTV_DEBUG_HI_FILE("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused); |