mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
86998818b7
commit
42ecf16c29
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue