Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Petter Selasky and committed by
Mauro Carvalho Chehab
67e27c74 6c20c635

+1 -1
+1 -1
drivers/media/video/gspca/sonixj.c
··· 60 60 61 61 u32 pktsz; /* (used by pkt_scan) */ 62 62 u16 npkt; 63 - u8 nchg; 63 + s8 nchg; 64 64 s8 short_mark; 65 65 66 66 u8 quality; /* image quality */