]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 25 Apr 2010 19:27:14 +0000 (16:27 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:58:44 +0000 (12:58 -0300)
commitd6525679b36328a6f3b6b086a995ba1860d3eeb3
treeae71d7dfc5af77429f9d881d59ab98f08353c170
parent8b25b1cabc782ad158535f625806a3b5f1d475d1
V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0

The control step values reported by the device are used as a divisor
unchecked, which can result in a division by zero.

Check the step value and make it 1 when null.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c