Browse Source

[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 years ago
parent
commit
67e27c7413
1 changed files with 1 additions and 1 deletions
  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) */
 	u16 npkt;
-	u8 nchg;
+	s8 nchg;
 	s8 short_mark;
 
 	u8 quality;			/* image quality */