Commit c60503c1 authored by Roel Kluin's avatar Roel Kluin Committed by Mauro Carvalho Chehab

V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
CC: stable@kernel.org
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 882ead32
...@@ -2319,7 +2319,7 @@ static void do_autogain(struct gspca_dev *gspca_dev, u16 avg_lum) ...@@ -2319,7 +2319,7 @@ static void do_autogain(struct gspca_dev *gspca_dev, u16 avg_lum)
} }
} }
if (avg_lum > MAX_AVG_LUM) { if (avg_lum > MAX_AVG_LUM) {
if (sd->gain - 1 >= 0) { if (sd->gain >= 1) {
sd->gain--; sd->gain--;
set_gain(gspca_dev); set_gain(gspca_dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment