This function has sanity checks to make sure that "dev" is non-null. I
moved the dereference down below the checks. In the current code "dev"
is never actually null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
unsigned char *outp, unsigned long len)
{
unsigned char *startwrite, *startread;
- int bytesperline = dev->vbi_width;
+ int bytesperline;
int i, j = 0;
if (dev == NULL) {
return;
}
+ bytesperline = dev->vbi_width;
+
if (dma_q->pos + len > buf->vb.size)
len = buf->vb.size - dma_q->pos;