projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77e67ba
)
technology: Remove technology driver by pointer
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 28 Jan 2013 15:44:32 +0000
(17:44 +0200)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Wed, 30 Jan 2013 08:27:34 +0000
(10:27 +0200)
Compare the technology driver pointer to the driver being unregistered
as the function is supposed to remove only the given driver.
Also check if the driver has a remove function before calling it.
src/technology.c
patch
|
blob
|
history
diff --git
a/src/technology.c
b/src/technology.c
index
6f03c69
..
7f2303c
100644
(file)
--- a/
src/technology.c
+++ b/
src/technology.c
@@
-162,9
+162,11
@@
void connman_technology_driver_unregister(struct connman_technology_driver *driv
if (technology->driver == NULL)
continue;
- if (technology->type == driver->type) {
- technology->driver->remove(technology);
+ if (technology->driver == driver) {
+ if (driver->remove != NULL)
+ driver->remove(technology);
technology->driver = NULL;
+ break;
}
}