projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8699881
)
huawei: do not check for NULL pointer
author
Lucas De Marchi
<lucas.demarchi@profusion.mobi>
Fri, 4 Mar 2011 13:10:13 +0000
(10:10 -0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 4 Mar 2011 13:14:02 +0000
(
05:14
-0800)
cb_data_new() uses g_new0(), hence there's no need to check the return
value being NULL.
plugins/huawei.c
patch
|
blob
|
history
diff --git
a/plugins/huawei.c
b/plugins/huawei.c
index
6f05677
..
afa804d
100644
(file)
--- 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);