From 42ecf16c294838f77446ff9f52a5437f221c4ff8 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 4 Mar 2011 10:10:13 -0300 Subject: [PATCH] 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. --- plugins/huawei.c | 4 ---- 1 file changed, 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);