* [PATCH BlueZ] audio: Fix attempting to create a device on driver .remove
@ 2012-09-25 10:54 Luiz Augusto von Dentz
2012-09-25 12:58 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-09-25 10:54 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] audio: Fix attempting to create a device on driver .remove
2012-09-25 10:54 [PATCH BlueZ] audio: Fix attempting to create a device on driver .remove Luiz Augusto von Dentz
@ 2012-09-25 12:58 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-09-25 12:58 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Tue, Sep 25, 2012, Luiz Augusto von Dentz wrote:
> 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(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-25 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 10:54 [PATCH BlueZ] audio: Fix attempting to create a device on driver .remove Luiz Augusto von Dentz
2012-09-25 12:58 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).