public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] dsbr100: add few lost mutex locks
@ 2009-02-08 13:28 Alexey Klimov
  0 siblings, 0 replies; only message in thread
From: Alexey Klimov @ 2009-02-08 13:28 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 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) {



-- 
Best regards, Klimov Alexey


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

only message in thread, other threads:[~2009-02-08 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-08 13:28 [patch] dsbr100: add few lost mutex locks Alexey Klimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox