summaryrefslogtreecommitdiffstats
path: root/drivers/calypsomodem/stk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/calypsomodem/stk.c')
-rw-r--r--drivers/calypsomodem/stk.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c
index c7300841..052e1f98 100644
--- a/drivers/calypsomodem/stk.c
+++ b/drivers/calypsomodem/stk.c
@@ -73,26 +73,21 @@ static void sate_cb(gboolean ok, GAtResult *result, gpointer user_data)
error.type = OFONO_ERROR_TYPE_NO_ERROR;
}
- if (!ok) {
- cb(&error, NULL, 0, cbd->data);
- return;
- }
+ if (!ok)
+ goto done;
g_at_result_iter_init(&iter, result);
if (g_at_result_iter_next(&iter, "%SATE:") == FALSE)
- goto error;
+ goto done;
/* Response data is optional */
g_at_result_iter_next_hexstring(&iter, &pdu, &len);
DBG("len %d", len);
+done:
cb(&error, pdu, len, cbd->data);
- return;
-
-error:
- CALLBACK_WITH_FAILURE(cb, NULL, 0, cbd->data);
}
static void calypso_stk_envelope(struct ofono_stk *stk, int length,