Message ID | 1233623340.17456.263.camel@tux.localhost (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff -r 5f3bbcc00bcf linux/drivers/media/radio/radio-mr800.c --- a/linux/drivers/media/radio/radio-mr800.c Tue Feb 03 03:05:09 2009 +0300 +++ b/linux/drivers/media/radio/radio-mr800.c Tue Feb 03 03:06:20 2009 +0300 @@ -434,7 +434,10 @@ if (radio->removed) return -EIO; + mutex_lock(&radio->lock); radio->curfreq = f->frequency; + mutex_unlock(&radio->lock); + retval = amradio_setfreq(radio, radio->curfreq); if (retval < 0) amradio_dev_warn(&radio->videodev->dev, @@ -602,7 +605,9 @@ if (!radio) return -ENODEV; + mutex_lock(&radio->lock); radio->users = 0; + mutex_unlock(&radio->lock); if (!radio->removed) { retval = amradio_set_mute(radio, AMRADIO_STOP);
Patch adds two lost mutex locks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> --