Message ID | 1234099707.10910.2.camel@tux.localhost (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff -r 71e5a36634ea linux/drivers/media/radio/dsbr100.c --- a/linux/drivers/media/radio/dsbr100.c Mon Feb 02 10:33:31 2009 +0100 +++ b/linux/drivers/media/radio/dsbr100.c Sun Feb 08 16:24:34 2009 +0300 @@ -455,7 +455,10 @@ 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"); @@ -606,7 +609,10 @@ 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) {
Patch adds two lost mutex locks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> --