summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/topro.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/gspca/topro.c')
-rw-r--r--drivers/media/usb/gspca/topro.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/topro.c b/drivers/media/usb/gspca/topro.c
index 5fcd1eec2004..c70ff406b07a 100644
--- a/drivers/media/usb/gspca/topro.c
+++ b/drivers/media/usb/gspca/topro.c
@@ -969,7 +969,9 @@ static void jpeg_set_qual(u8 *jpeg_hdr,
{
int i, sc;
- if (quality < 50)
+ if (quality <= 0)
+ sc = 5000;
+ else if (quality < 50)
sc = 5000 / quality;
else
sc = 200 - quality * 2;