Thread (2 messages) flat view 2 messages, 2 authors, 2012-09-25
STALE5107d

[PATCH BlueZ] audio: Fix attempting to create a device on driver .remove

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2012-09-25 10:54:59
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

audio_remove calls get_audio_dev which may attempt to create the device
if it doesn't exist.
---
 audio/manager.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/audio/manager.c b/audio/manager.c
index fbfe00f..6d7ac55 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -668,9 +668,12 @@ static struct audio_device *get_audio_dev(struct btd_device *device)
 static void audio_remove(struct btd_device *device)
 {
 	struct audio_device *dev;
+	const char *path;
 
-	dev = get_audio_dev(device);
-	if (!dev)
+	path = device_get_path(device);
+
+	dev = manager_find_device(path, NULL, NULL, NULL, FALSE);
+	if (dev == NULL)
 		return;
 
 	devices = g_slist_remove(devices, dev);
-- 
1.7.11.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help