--- drivers/ifxmodem/ctm.c | 8 -------- drivers/ifxmodem/stk.c | 4 ++-- drivers/ifxmodem/voicecall.c | 7 ------- 3 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/ifxmodem/ctm.c b/drivers/ifxmodem/ctm.c index b70fe09..7b23a9b 100644 --- a/drivers/ifxmodem/ctm.c +++ b/drivers/ifxmodem/ctm.c @@ -88,14 +88,10 @@ static void ifx_query_tty(struct ofono_ctm *ctm, ofono_ctm_query_cb_t cb, struct ctm_data *ctmd = ofono_ctm_get_data(ctm); struct cb_data *cbd = cb_data_new(cb, data); - if (cbd == NULL) - goto error; - if (g_at_chat_send(ctmd->chat, "AT+XCTMS?", xctms_prefix, xctms_query_cb, cbd, g_free) > 0) return; -error: g_free(cbd); CALLBACK_WITH_FAILURE(cb, -1, data); @@ -121,9 +117,6 @@ static void ifx_set_tty(struct ofono_ctm *ctm, ofono_bool_t enable, struct cb_data *cbd = cb_data_new(cb, data); char buf[20]; - if (cbd == NULL) - goto error; - /* Only FULL TTY mode enabled/disabled */ snprintf(buf, sizeof(buf), "AT+XCTMS=%i", enable ? 1 : 0); @@ -131,7 +124,6 @@ static void ifx_set_tty(struct ofono_ctm *ctm, ofono_bool_t enable, xctms_modify_cb, cbd, g_free) > 0) return; -error: g_free(cbd); CALLBACK_WITH_FAILURE(cb, data); diff --git a/drivers/ifxmodem/stk.c b/drivers/ifxmodem/stk.c index 5951149..f08cf47 100644 --- a/drivers/ifxmodem/stk.c +++ b/drivers/ifxmodem/stk.c @@ -104,7 +104,7 @@ static void ifx_stk_envelope(struct ofono_stk *stk, int length, DBG(""); - if (cbd == NULL || buf == NULL) + if (buf == NULL) goto error; len = sprintf(buf, "AT+SATE=\""); @@ -150,7 +150,7 @@ static void ifx_stk_terminal_response(struct ofono_stk *stk, int length, DBG(""); - if (cbd == NULL || buf == NULL) + if (buf == NULL) goto error; len = sprintf(buf, "AT+SATR=\""); diff --git a/drivers/ifxmodem/voicecall.c b/drivers/ifxmodem/voicecall.c index fcd0c7e..716652c 100644 --- a/drivers/ifxmodem/voicecall.c +++ b/drivers/ifxmodem/voicecall.c @@ -305,9 +305,6 @@ static void ifx_dial(struct ofono_voicecall *vc, struct cb_data *cbd = cb_data_new(cb, data); char buf[256]; - if (cbd == NULL) - goto error; - cbd->user = vc; if (ph->type == 145) @@ -332,7 +329,6 @@ static void ifx_dial(struct ofono_voicecall *vc, atd_cb, cbd, g_free) > 0) return; -error: g_free(cbd); CALLBACK_WITH_FAILURE(cb, data); @@ -504,9 +500,6 @@ static void ifx_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, int i; char *buf; - if (cbd == NULL) - goto error; - /* strlen("+VTS=T\;") = 7 + initial AT + null */ buf = g_try_new(char, len * 7 + 3); if (buf == NULL) -- 1.7.0.4 _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono