summaryrefslogtreecommitdiffstats
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
parentc00904e2d3a8d000a2b792ae93da4d8aac33a4f8 (diff)
downloadofono-52e46e42ffade1925a783f1d649573262b5e67ca.tar.bz2
ifxmodem: remove NULL check
-rw-r--r--drivers/ifxmodem/ctm.c8
-rw-r--r--drivers/ifxmodem/stk.c4
-rw-r--r--drivers/ifxmodem/voicecall.c7
3 files changed, 2 insertions, 17 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);
diff --git a/drivers/ifxmodem/stk.c b/drivers/ifxmodem/stk.c
index 59511493..f08cf471 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 fcd0c7e8..716652cb 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)