modem: Don't move to pre-sim state in case of failure

In ofono_modem_reset, if the enable() callback fails, do not
proceed to the pre-sim state
This commit is contained in:
Denis Kenzior 2015-12-15 15:11:28 -08:00
parent 544651cdfe
commit 68e4007d7b
1 changed files with 3 additions and 0 deletions

View File

@ -2132,6 +2132,9 @@ void ofono_modem_reset(struct ofono_modem *modem)
if (err == -EINPROGRESS)
return;
if (err < 0)
return;
modem_change_state(modem, MODEM_STATE_PRE_SIM);
}