소스 검색

V4L/DVB (5249): Fix compiler warning in vivi.c

The result of copy_to_user was not used, so the compiler complained
now a warning will be issued if copy_to_user fails.

Signed-off-by: Marcel Siegert <mws@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Marcel Siegert 18 년 전
부모
커밋
4acf26703e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      drivers/media/video/vivi.c

+ 2 - 1
drivers/media/video/vivi.c

@@ -447,7 +447,8 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
 		if (buf->vb.dma.varea) {
 		if (buf->vb.dma.varea) {
 			gen_line(tmpbuf,0,wmax,hmax,h,dev->timestr);
 			gen_line(tmpbuf,0,wmax,hmax,h,dev->timestr);
 			/* FIXME: replacing to __copy_to_user */
 			/* FIXME: replacing to __copy_to_user */
-			copy_to_user(buf->vb.dma.varea+pos,tmpbuf,wmax*2);
+			if (copy_to_user(buf->vb.dma.varea+pos,tmpbuf,wmax*2)!=0)
+				dprintk(2,"vivifill copy_to_user failed.\n");
 		} else {
 		} else {
 			gen_line(tmpbuf,pos,wmax,hmax,h,dev->timestr);
 			gen_line(tmpbuf,pos,wmax,hmax,h,dev->timestr);
 		}
 		}