summaryrefslogtreecommitdiff
path: root/drivers/calypsomodem
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-29 05:34:36 -0800
committerMarcel Holtmann <marcel@holtmann.org>2011-01-29 18:39:37 +0100
commitb6331608c2e206b3bf4864d617c7f42fbf2768c2 (patch)
tree45e020f18b1779ef1202e89f60e68239c5c8f578 /drivers/calypsomodem
parent4258fb591599534f6447c1371e92427ccece5f51 (diff)
calypsomodem: remove NULL check
Diffstat (limited to 'drivers/calypsomodem')
-rw-r--r--drivers/calypsomodem/stk.c4
-rw-r--r--drivers/calypsomodem/voicecall.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c
index 196b9e33..83287f93 100644
--- a/drivers/calypsomodem/stk.c
+++ b/drivers/calypsomodem/stk.c
@@ -101,7 +101,7 @@ static void calypso_stk_envelope(struct ofono_stk *stk, int length,
DBG("");
- if (cbd == NULL || buf == NULL)
+ if (buf == NULL)
goto error;
len = sprintf(buf, "AT%%SATE=\"");
@@ -148,7 +148,7 @@ static void calypso_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/calypsomodem/voicecall.c b/drivers/calypsomodem/voicecall.c
index 204ed14c..01be9907 100644
--- a/drivers/calypsomodem/voicecall.c
+++ b/drivers/calypsomodem/voicecall.c
@@ -64,14 +64,10 @@ static void calypso_template(struct ofono_voicecall *vc, const char *cmd,
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
struct cb_data *cbd = cb_data_new(cb, data);
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(vd->chat, cmd, none_prefix,
calypso_generic_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);