Skip to content

Commit

Permalink
[media] Make nchg variable signed because the code compares this vari…
Browse files Browse the repository at this point in the history
…able 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>
  • Loading branch information
Hans Petter Selasky authored and Mauro Carvalho Chehab committed Jun 1, 2011
1 parent 6c20c63 commit 67e27c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/sonixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 67e27c7

Please sign in to comment.