Re: [PATCH] gpsca: remove the risk of a division by zero

2015-02-09 Thread Luis de Bethencourt
On Mon, Feb 09, 2015 at 10:16:25AM +, Luis de Bethencourt wrote: > As reported by Peter Kovar, there's a potential risk of a division by zero on > calls to jpeg_set_qual() when quality is zero. > > As quality can't be 0 or lower than that, add an extra clause to cover this > special case. > >

[PATCH] gpsca: remove the risk of a division by zero

2015-02-09 Thread Luis de Bethencourt
As reported by Peter Kovar, there's a potential risk of a division by zero on calls to jpeg_set_qual() when quality is zero. As quality can't be 0 or lower than that, add an extra clause to cover this special case. Signed-off-by: Luis de Bethencourt --- drivers/media/usb/gspca/topro.c | 4 +++-