diff options
author | Ben Chan <benchan@chromium.org> | 2017-08-07 14:05:03 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-08-08 09:23:55 +0200 |
commit | 05a1097a27ff7c7349e6d9730a7009c3b6d9670b (patch) | |
tree | 4bd5963b61dc3d935698d1adf7e9357211781aa8 | |
parent | 75036a46580bb38d0957e64cd4a59539df16c6f8 (diff) |
iface-modem: remove unnecessary error check
This patch removes an unnecessary error check in the
update_unlock_retries() where the error is never set.
-rw-r--r-- | src/mm-iface-modem.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index ec453a8f..c025b5c5 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -2931,7 +2931,6 @@ update_unlock_retries (MMIfaceModem *self, MMUnlockRetries *unlock_retries) { MmGdbusModem *skeleton = NULL; - GError *error = NULL; GVariant *previous_dictionary; MMUnlockRetries *previous_unlock_retries; @@ -2944,18 +2943,13 @@ update_unlock_retries (MMIfaceModem *self, previous_dictionary = mm_gdbus_modem_get_unlock_retries (skeleton); previous_unlock_retries = mm_unlock_retries_new_from_dictionary (previous_dictionary); - if (error) { - mm_warn ("Couldn't build previous unlock retries: '%s'", error->message); - g_error_free (error); - } else { - /* If they are different, update */ - if (!mm_unlock_retries_cmp (unlock_retries, previous_unlock_retries)) { - GVariant *new_dictionary; + /* If they are different, update */ + if (!mm_unlock_retries_cmp (unlock_retries, previous_unlock_retries)) { + GVariant *new_dictionary; - new_dictionary = mm_unlock_retries_get_dictionary (unlock_retries); - mm_gdbus_modem_set_unlock_retries (skeleton, new_dictionary); - g_variant_unref (new_dictionary); - } + new_dictionary = mm_unlock_retries_get_dictionary (unlock_retries); + mm_gdbus_modem_set_unlock_retries (skeleton, new_dictionary); + g_variant_unref (new_dictionary); } g_object_unref (previous_unlock_retries); |