summaryrefslogtreecommitdiffstats
path: root/plugins/huawei.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2011-03-04 10:10:13 -0300
committerMarcel Holtmann <marcel@holtmann.org>2011-03-04 05:14:02 -0800
commit42ecf16c294838f77446ff9f52a5437f221c4ff8 (patch)
treeb9feff8e4235a8cf66553c3b6c34f9eb5366d97f /plugins/huawei.c
parent86998818b70ab030c74cdf2f5de83cd9893cc993 (diff)
downloadofono-42ecf16c294838f77446ff9f52a5437f221c4ff8.tar.bz2
huawei: do not check for NULL pointer
cb_data_new() uses g_new0(), hence there's no need to check the return value being NULL.
Diffstat (limited to 'plugins/huawei.c')
-rw-r--r--plugins/huawei.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 6f056773..afa804d5 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -600,13 +600,9 @@ static void huawei_set_online(struct ofono_modem *modem, ofono_bool_t online,
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);