aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-09-18 20:50:45 -0700
committerAleksander Morgado <aleksander@aleksander.es>2017-09-18 20:50:45 -0700
commitfd508d7057da8abb0a409b02788dda5372accf8c (patch)
tree0bbb6d4be11cfd9738356ce2a2276c1ee173025a
parent4fbd88395d79238f19c20e35c7ba589c7d05868b (diff)
sierra: skip setting GError if not used
The return status of mm_base_modem_at_command_finish() already specifies whether an error has happened or not, so skip creating the GError if we don't care about the actual error details.
-rw-r--r--plugins/sierra/mm-broadband-modem-sierra.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c
index caa54596..da7cae29 100644
--- a/plugins/sierra/mm-broadband-modem-sierra.c
+++ b/plugins/sierra/mm-broadband-modem-sierra.c
@@ -1297,16 +1297,13 @@ status_ready (MMIfaceModemCdma *self,
GTask *task)
{
DetailedRegistrationStateResults *results;
- GError *error = NULL;
const gchar *response;
results = g_task_get_task_data (task);
- response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error);
/* If error, leave superclass' reg state alone if AT!STATUS isn't supported. */
- if (error)
- g_error_free (error);
- else
+ response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL);
+ if (response)
parse_status (response,
&(results->detailed_cdma1x_state),
&(results->detailed_evdo_state),