projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
622221e
)
Sanity check the atom register/unregister funcs
author
Denis Kenzior
<denkenz@gmail.com>
Fri, 14 Aug 2009 19:56:47 +0000
(14:56 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Fri, 14 Aug 2009 20:15:06 +0000
(15:15 -0500)
src/modem.c
patch
|
blob
|
history
diff --git
a/src/modem.c
b/src/modem.c
index
285aa33
..
8119ea1
100644
(file)
--- a/
src/modem.c
+++ b/
src/modem.c
@@
-135,13
+135,18
@@
void *__ofono_atom_get_data(struct ofono_atom *atom)
void __ofono_atom_register(struct ofono_atom *atom,
void (*unregister)(struct ofono_atom *))
{
+ if (unregister == NULL)
+ return;
+
atom->unregister = unregister;
}
void __ofono_atom_unregister(struct ofono_atom *atom)
{
- if (atom->unregister)
- atom->unregister(atom);
+ if (atom->unregister == NULL)
+ return;
+
+ atom->unregister(atom);
}
struct ofono_atom *__ofono_modem_find_atom(struct ofono_modem *modem,