mirror of git://git.sysmocom.de/ofono
modem: Only find registered atoms
Change the semantics of __ofono_modem_find_atom to only return registered atoms.
This commit is contained in:
parent
3e799ce8b4
commit
767d297263
|
@ -318,7 +318,7 @@ struct ofono_atom *__ofono_modem_find_atom(struct ofono_modem *modem,
|
|||
for (l = modem->atoms; l; l = l->next) {
|
||||
atom = l->data;
|
||||
|
||||
if (atom->type == type)
|
||||
if (atom->type == type && atom->unregister != NULL)
|
||||
return atom;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue