瀏覽代碼

[media] Make nchg variable signed because the code compares this variable against negative values

The sonixj driver compares the value for nchg with:
 		if (sd->nchg < -6 || sd->nchg >= 12) {

With u8, negative values won't work.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Petter Selasky 14 年之前
父節點
當前提交
67e27c7413
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/video/gspca/sonixj.c

+ 1 - 1
drivers/media/video/gspca/sonixj.c

@@ -60,7 +60,7 @@ struct sd {
 
 
 	u32 pktsz;			/* (used by pkt_scan) */
 	u32 pktsz;			/* (used by pkt_scan) */
 	u16 npkt;
 	u16 npkt;
-	u8 nchg;
+	s8 nchg;
 	s8 short_mark;
 	s8 short_mark;
 
 
 	u8 quality;			/* image quality */
 	u8 quality;			/* image quality */