aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-base-modem.c')
-rw-r--r--src/mm-base-modem.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
index c8e042e0..7ad2f259 100644
--- a/src/mm-base-modem.c
+++ b/src/mm-base-modem.c
@@ -565,22 +565,18 @@ initialize_ready (MMBaseModem *self,
if (!mm_base_modem_initialize_finish (self, res, &error)) {
/* Wrong state is returned when modem is found locked */
- if (g_error_matches (error,
- MM_CORE_ERROR,
- MM_CORE_ERROR_WRONG_STATE)) {
+ if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE))
mm_dbg ("Couldn't finish initialization in the current state: '%s'",
error->message);
- mm_base_modem_set_valid (self, TRUE);
- } else {
+ else
mm_warn ("couldn't initialize the modem: '%s'", error->message);
- mm_base_modem_set_valid (self, FALSE);
- }
-
g_error_free (error);
- return;
- }
+ } else
+ mm_dbg ("modem properly initialized");
- mm_dbg ("modem properly initialized");
+ /* Even with initialization errors, we do set the state to valid, so
+ * that the modem gets exported and the failure notified to the user.
+ */
mm_base_modem_set_valid (self, TRUE);
}