summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/au0828
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/au0828')
-rw-r--r--drivers/media/video/au0828/au0828-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index d97e0a28fb2..7989a7ba7c4 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -441,7 +441,7 @@ static void au0828_copy_vbi(struct au0828_dev *dev,
unsigned char *outp, unsigned long len)
{
unsigned char *startwrite, *startread;
- int bytesperline = dev->vbi_width;
+ int bytesperline;
int i, j = 0;
if (dev == NULL) {
@@ -464,6 +464,8 @@ static void au0828_copy_vbi(struct au0828_dev *dev,
return;
}
+ bytesperline = dev->vbi_width;
+
if (dma_q->pos + len > buf->vb.size)
len = buf->vb.size - dma_q->pos;