mirror of git://git.sysmocom.de/ofono
huaweimodem: remove NULL check
This commit is contained in:
parent
85865ac98d
commit
c00904e2d3
|
@ -311,9 +311,6 @@ static void huawei_gprs_activate_primary(struct ofono_gprs_context *gc,
|
|||
|
||||
DBG("cid %u", ctx->cid);
|
||||
|
||||
if (cbd == NULL)
|
||||
goto error;
|
||||
|
||||
gcd->active_context = ctx->cid;
|
||||
|
||||
cbd->user = gc;
|
||||
|
@ -328,7 +325,6 @@ static void huawei_gprs_activate_primary(struct ofono_gprs_context *gc,
|
|||
at_cgdcont_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
g_free(cbd);
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, NULL, 0, NULL, NULL, NULL, NULL, data);
|
||||
|
@ -344,9 +340,6 @@ static void huawei_gprs_deactivate_primary(struct ofono_gprs_context *gc,
|
|||
|
||||
DBG("cid %u", cid);
|
||||
|
||||
if (cbd == NULL)
|
||||
goto error;
|
||||
|
||||
cbd->user = gc;
|
||||
|
||||
snprintf(buf, sizeof(buf), "AT^NDISDUP=%u,0", cid);
|
||||
|
@ -355,7 +348,6 @@ static void huawei_gprs_deactivate_primary(struct ofono_gprs_context *gc,
|
|||
at_ndisdup_down_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
g_free(cbd);
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
|
|
|
@ -99,14 +99,10 @@ static void huawei_template(struct ofono_voicecall *vc, const char *cmd,
|
|||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
if (cbd == NULL)
|
||||
goto error;
|
||||
|
||||
if (g_at_chat_send(vd->chat, cmd, none_prefix,
|
||||
huawei_generic_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
g_free(cbd);
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
|
|
Loading…
Reference in New Issue