summaryrefslogtreecommitdiffstats
path: root/drivers/ifxmodem/ctm.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-29 05:34:40 -0800
committerMarcel Holtmann <marcel@holtmann.org>2011-01-29 18:39:37 +0100
commit52e46e42ffade1925a783f1d649573262b5e67ca (patch)
treef8552d2f1ea5e2dfeb3701d0d177118d65d156a9 /drivers/ifxmodem/ctm.c
parentc00904e2d3a8d000a2b792ae93da4d8aac33a4f8 (diff)
downloadofono-52e46e42ffade1925a783f1d649573262b5e67ca.tar.bz2
ifxmodem: remove NULL check
Diffstat (limited to 'drivers/ifxmodem/ctm.c')
-rw-r--r--drivers/ifxmodem/ctm.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/ifxmodem/ctm.c b/drivers/ifxmodem/ctm.c
index b70fe092..7b23a9b0 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);