diff options
author | Alexey Klimov <klimov.linux@gmail.com> | 2009-02-08 00:00:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:41 -0400 |
commit | fdf9c9979a355916433262ea5e5e64bed5def86e (patch) | |
tree | db185c51fa0cc5737e5399670bdba3014ba992b8 /drivers/media/radio/dsbr100.c | |
parent | dc025d4a1afac9576987748f15e9ba47c7bd20db (diff) |
V4L/DVB (10465): dsbr100: Add few lost mutex locks.
Patch adds two lost mutex locks.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/dsbr100.c')
-rw-r--r-- | drivers/media/radio/dsbr100.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index 09988f020c48..cc54ed4efc48 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c | |||
@@ -452,7 +452,10 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
452 | if (radio->removed) | 452 | if (radio->removed) |
453 | return -EIO; | 453 | return -EIO; |
454 | 454 | ||
455 | mutex_lock(&radio->lock); | ||
455 | radio->curfreq = f->frequency; | 456 | radio->curfreq = f->frequency; |
457 | mutex_unlock(&radio->lock); | ||
458 | |||
456 | retval = dsbr100_setfreq(radio, radio->curfreq); | 459 | retval = dsbr100_setfreq(radio, radio->curfreq); |
457 | if (retval < 0) | 460 | if (retval < 0) |
458 | dev_warn(&radio->usbdev->dev, "Set frequency failed\n"); | 461 | dev_warn(&radio->usbdev->dev, "Set frequency failed\n"); |
@@ -603,7 +606,10 @@ static int usb_dsbr100_close(struct file *file) | |||
603 | if (!radio) | 606 | if (!radio) |
604 | return -ENODEV; | 607 | return -ENODEV; |
605 | 608 | ||
609 | mutex_lock(&radio->lock); | ||
606 | radio->users = 0; | 610 | radio->users = 0; |
611 | mutex_unlock(&radio->lock); | ||
612 | |||
607 | if (!radio->removed) { | 613 | if (!radio->removed) { |
608 | retval = dsbr100_stop(radio); | 614 | retval = dsbr100_stop(radio); |
609 | if (retval < 0) { | 615 | if (retval < 0) { |