diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-10-20 23:09:05 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-10-20 23:09:05 +0300 |
commit | d22ff9b28c86923e1f0e1b5124d1ef2a95bbb7dc (patch) | |
tree | 57d33e925cee8d824dfbb4ba4fa6858b131043d1 /src/adapter.c | |
parent | 219256e53d4001a7e61ae68302677d7763abef0c (diff) | |
download | bluez-d22ff9b28c86923e1f0e1b5124d1ef2a95bbb7dc.tar.gz |
Fix unloading of drivers for uninitialized adapters
If adapter initialization fails we shouldn't call the adapter driver
remove callbacks since their respective probe callbacks were never called.
Diffstat (limited to 'src/adapter.c')
-rw-r--r-- | src/adapter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c index 6a7ad9812..fec14dc16 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2431,7 +2431,8 @@ void adapter_remove(struct btd_adapter *adapter) device_remove(l->data, FALSE); g_slist_free(adapter->devices); - unload_drivers(adapter); + if (adapter->initialized) + unload_drivers(adapter); /* Return adapter to down state if it was not up on init */ if (adapter->up && !adapter->already_up) |