Commit fcf5cb24 authored by Rabin Vincent's avatar Rabin Vincent Committed by Mauro Carvalho Chehab

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: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent cebf3b67
...@@ -904,7 +904,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, ...@@ -904,7 +904,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
if (ctrl->id != ctrls->qctrl.id) if (ctrl->id != ctrls->qctrl.id)
continue; continue;
if (ctrl->value < ctrls->qctrl.minimum if (ctrl->value < ctrls->qctrl.minimum
&& ctrl->value > ctrls->qctrl.maximum) || ctrl->value > ctrls->qctrl.maximum)
return -ERANGE; return -ERANGE;
PDEBUG(D_CONF, "set ctrl [%08x] = %d", ctrl->id, ctrl->value); PDEBUG(D_CONF, "set ctrl [%08x] = %d", ctrl->id, ctrl->value);
if (mutex_lock_interruptible(&gspca_dev->usb_lock)) if (mutex_lock_interruptible(&gspca_dev->usb_lock))
......
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