All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch review 7/8] radio-mr800: add few lost mutex locks
@ 2009-02-03  1:09 Alexey Klimov
  0 siblings, 0 replies; only message in thread
From: Alexey Klimov @ 2009-02-03  1:09 UTC (permalink / raw)
  To: Douglas Schilling Landgraf; +Cc: linux-media

Patch adds two lost mutex locks.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>

--
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);


-- 
Best regards, Klimov Alexey


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-03  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-03  1:09 [patch review 7/8] radio-mr800: add few lost mutex locks Alexey Klimov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.