[media] Make nchg variable signed because the code compares this variable against...
authorHans Petter Selasky <hselasky@c2i.net>
Mon, 23 May 2011 11:09:18 +0000 (08:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 1 Jun 2011 15:20:57 +0000 (12:20 -0300)
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>
drivers/media/video/gspca/sonixj.c

index 6415aff5cbd1675cb4f96d106b9eb72b78b8977b..81b8a600783b575290814af47931ee5b1702ebcf 100644 (file)
@@ -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 */