Skip to content

Commit

Permalink
V4L/DVB (10465): dsbr100: Add few lost mutex locks.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Klimov authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent dc025d4 commit fdf9c99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/radio/dsbr100.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ static int vidioc_s_frequency(struct file *file, void *priv,
if (radio->removed)
return -EIO;

mutex_lock(&radio->lock);
radio->curfreq = f->frequency;
mutex_unlock(&radio->lock);

retval = dsbr100_setfreq(radio, radio->curfreq);
if (retval < 0)
dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
Expand Down Expand Up @@ -603,7 +606,10 @@ static int usb_dsbr100_close(struct file *file)
if (!radio)
return -ENODEV;

mutex_lock(&radio->lock);
radio->users = 0;
mutex_unlock(&radio->lock);

if (!radio->removed) {
retval = dsbr100_stop(radio);
if (retval < 0) {
Expand Down

0 comments on commit fdf9c99

Please sign in to comment.