aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJim Paris <jim@jtan.com>2008-12-10 03:50:44 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-16 13:43:58 -0500
commitf86d4a9173e47050de9f88faa4aaf70a718791c5 (patch)
treed9b48406f2f1a454c6a40666a83bc10bccb0827f /drivers
parent11c6c7fb89a7526841eb4f294de631f3b8a31f10 (diff)
V4L/DVB (9875): gspca - main: Fix vidioc_s_jpegcomp locking.
Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/gspca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 748a87e82e44..02a6e9ef0337 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1264,10 +1264,10 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv,
1264 struct gspca_dev *gspca_dev = priv; 1264 struct gspca_dev *gspca_dev = priv;
1265 int ret; 1265 int ret;
1266 1266
1267 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
1268 return -ERESTARTSYS;
1269 if (!gspca_dev->sd_desc->set_jcomp) 1267 if (!gspca_dev->sd_desc->set_jcomp)
1270 return -EINVAL; 1268 return -EINVAL;
1269 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
1270 return -ERESTARTSYS;
1271 ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp); 1271 ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
1272 mutex_unlock(&gspca_dev->usb_lock); 1272 mutex_unlock(&gspca_dev->usb_lock);
1273 return ret; 1273 return ret;