From: Rabin Vincent Date: Sun, 3 Aug 2008 10:58:54 +0000 (-0300) Subject: V4L/DVB (8605): gspca: Fix of gspca_zc3xx oops - 2.6.27-rc1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fcf5cb2406827fc9d3f3fe260ac883ef72b8bac0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git V4L/DVB (8605): gspca: Fix of gspca_zc3xx oops - 2.6.27-rc1 Bad mini/max check in setting control values (the gamma in zc3xx could be set to null). Signed-off-by: Rabin Vincent Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 7f773e378979..15d302b28b79 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -904,7 +904,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, if (ctrl->id != ctrls->qctrl.id) continue; if (ctrl->value < ctrls->qctrl.minimum - && ctrl->value > ctrls->qctrl.maximum) + || ctrl->value > ctrls->qctrl.maximum) return -ERANGE; PDEBUG(D_CONF, "set ctrl [%08x] = %d", ctrl->id, ctrl->value); if (mutex_lock_interruptible(&gspca_dev->usb_lock))