提交 d084aa70 编写于 作者: E Eric Sesterhenn 提交者: Mauro Carvalho Chehab

V4L/DVB (4510): Fix signedness error in drivers/media/video/vivi.c

when checking the -Wextra signedness warnings issued by gcc 4.1
I came across this one:
drivers/media/video/vivi.c:1001: warning: comparison of unsigned expression < 0 is always false
Since videobuf_reqbufs() returns negative values on errors the current
code does no real error checking since gcc removes the comparison.
This patch fixes this issue by making ret a normal, signed integer.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 3153d0d0
......@@ -992,7 +992,8 @@ static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf)
struct vivi_fh *fh=priv;
struct videobuf_queue *q=&fh->vb_vidq;
struct v4l2_requestbuffers req;
unsigned int i, ret;
unsigned int i;
int ret;
req.type = q->type;
req.count = 8;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册