summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-12-10 09:50:44 +0100
committerJean-Francois Moine <moinejf@free.fr>2008-12-10 09:50:44 +0100
commite826ea04411b7254088a42b69162390d6432f3bc (patch)
treebbff14db0422f79894214567d8d4cbaa56525de9 /linux/drivers/media/video/gspca
parent88fe68b0680d49807a552b016bee47a5020b87b3 (diff)
downloadmediapointer-dvb-s2-e826ea04411b7254088a42b69162390d6432f3bc.tar.gz
mediapointer-dvb-s2-e826ea04411b7254088a42b69162390d6432f3bc.tar.bz2
gspca - main: Fix vidioc_s_jpegcomp locking.
From: Jim Paris <jim@jtan.com> Priority: high Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index 4fda0fca6..7066c9daf 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -1320,10 +1320,10 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv,
struct gspca_dev *gspca_dev = priv;
int ret;
- if (mutex_lock_interruptible(&gspca_dev->usb_lock))
- return -ERESTARTSYS;
if (!gspca_dev->sd_desc->set_jcomp)
return -EINVAL;
+ if (mutex_lock_interruptible(&gspca_dev->usb_lock))
+ return -ERESTARTSYS;
ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
mutex_unlock(&gspca_dev->usb_lock);
return ret;