summaryrefslogtreecommitdiffstats
path: root/plugins/phonesim.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-29 05:34:44 -0800
committerMarcel Holtmann <marcel@holtmann.org>2011-01-29 18:39:37 +0100
commit8c667aadad8b0028268735db710c0ddc8d60f4b7 (patch)
treed8a13ad939b5e3e05136709914bce5637964562d /plugins/phonesim.c
parentf9b34de3d41deb4c9f5cd50aa6dc9dc7bd186b00 (diff)
downloadofono-8c667aadad8b0028268735db710c0ddc8d60f4b7.tar.bz2
plugins: remove NULL check
Diffstat (limited to 'plugins/phonesim.c')
-rw-r--r--plugins/phonesim.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index 28306b50..2b36fe0c 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -143,9 +143,6 @@ static void phonesim_deactivate_primary(struct ofono_gprs_context *gc,
struct cb_data *cbd = cb_data_new(cb, data);
char buf[128];
- if (cbd == NULL)
- goto error;
-
cbd->user = gc;
snprintf(buf, sizeof(buf), "AT+CGACT=0,%u", id);
@@ -154,7 +151,6 @@ static void phonesim_deactivate_primary(struct ofono_gprs_context *gc,
at_cgact_down_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
@@ -273,14 +269,10 @@ static void phonesim_ctm_query(struct ofono_ctm *ctm,
DBG("");
- if (!cbd)
- goto error;
-
if (g_at_chat_send(chat, "AT+PTTY?", ptty_prefix,
ctm_query_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, 0, data);
@@ -305,16 +297,12 @@ static void phonesim_ctm_set(struct ofono_ctm *ctm, ofono_bool_t enable,
DBG("");
- if (!cbd)
- goto error;
-
snprintf(buf, sizeof(buf), "AT+PTTY=%d", enable);
if (g_at_chat_send(chat, buf, none_prefix,
ctm_set_cb, cbd, g_free) > 0)
return;
-error:
CALLBACK_WITH_FAILURE(cb, data);
g_free(cbd);
}