aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/dsbr100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/radio/dsbr100.c')
-rw-r--r--drivers/media/radio/dsbr100.c6
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) {