Commit 52433bbb authored by Alexey Klimov's avatar Alexey Klimov Committed by Mauro Carvalho Chehab

V4L/DVB (10461): radio-mr800: add few lost mutex locks

Patch adds two lost mutex locks.
Signed-off-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1bb16d71
...@@ -431,7 +431,10 @@ static int vidioc_s_frequency(struct file *file, void *priv, ...@@ -431,7 +431,10 @@ static int vidioc_s_frequency(struct file *file, void *priv,
if (radio->removed) if (radio->removed)
return -EIO; return -EIO;
mutex_lock(&radio->lock);
radio->curfreq = f->frequency; radio->curfreq = f->frequency;
mutex_unlock(&radio->lock);
retval = amradio_setfreq(radio, radio->curfreq); retval = amradio_setfreq(radio, radio->curfreq);
if (retval < 0) if (retval < 0)
amradio_dev_warn(&radio->videodev->dev, amradio_dev_warn(&radio->videodev->dev,
...@@ -599,7 +602,9 @@ static int usb_amradio_close(struct file *file) ...@@ -599,7 +602,9 @@ static int usb_amradio_close(struct file *file)
if (!radio) if (!radio)
return -ENODEV; return -ENODEV;
mutex_lock(&radio->lock);
radio->users = 0; radio->users = 0;
mutex_unlock(&radio->lock);
if (!radio->removed) { if (!radio->removed) {
retval = amradio_set_mute(radio, AMRADIO_STOP); retval = amradio_set_mute(radio, AMRADIO_STOP);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment