iface-modem: remove unnecessary error check
This patch removes an unnecessary error check in the update_unlock_retries() where the error is never set.
This commit is contained in:

committed by
Aleksander Morgado

parent
75036a4658
commit
05a1097a27
@@ -2931,7 +2931,6 @@ update_unlock_retries (MMIfaceModem *self,
|
|||||||
MMUnlockRetries *unlock_retries)
|
MMUnlockRetries *unlock_retries)
|
||||||
{
|
{
|
||||||
MmGdbusModem *skeleton = NULL;
|
MmGdbusModem *skeleton = NULL;
|
||||||
GError *error = NULL;
|
|
||||||
GVariant *previous_dictionary;
|
GVariant *previous_dictionary;
|
||||||
MMUnlockRetries *previous_unlock_retries;
|
MMUnlockRetries *previous_unlock_retries;
|
||||||
|
|
||||||
@@ -2944,18 +2943,13 @@ update_unlock_retries (MMIfaceModem *self,
|
|||||||
previous_dictionary = mm_gdbus_modem_get_unlock_retries (skeleton);
|
previous_dictionary = mm_gdbus_modem_get_unlock_retries (skeleton);
|
||||||
previous_unlock_retries = mm_unlock_retries_new_from_dictionary (previous_dictionary);
|
previous_unlock_retries = mm_unlock_retries_new_from_dictionary (previous_dictionary);
|
||||||
|
|
||||||
if (error) {
|
/* If they are different, update */
|
||||||
mm_warn ("Couldn't build previous unlock retries: '%s'", error->message);
|
if (!mm_unlock_retries_cmp (unlock_retries, previous_unlock_retries)) {
|
||||||
g_error_free (error);
|
GVariant *new_dictionary;
|
||||||
} else {
|
|
||||||
/* 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);
|
new_dictionary = mm_unlock_retries_get_dictionary (unlock_retries);
|
||||||
mm_gdbus_modem_set_unlock_retries (skeleton, new_dictionary);
|
mm_gdbus_modem_set_unlock_retries (skeleton, new_dictionary);
|
||||||
g_variant_unref (new_dictionary);
|
g_variant_unref (new_dictionary);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (previous_unlock_retries);
|
g_object_unref (previous_unlock_retries);
|
||||||
|
Reference in New Issue
Block a user