提交 b5f5933a 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

V4L/DVB: au0828: move dereference below sanity checks

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: NDan Carpenter <error27@gmail.com>
Acked-by: NDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 49b7a12c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册