mbmmodem: remove NULL check

This commit is contained in:
Jeevaka Badrappan 2011-01-29 05:34:41 -08:00 committed by Marcel Holtmann
parent 52e46e42ff
commit 3fbf85ed82
2 changed files with 2 additions and 9 deletions

View File

@ -364,9 +364,6 @@ static void mbm_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;
@ -408,16 +405,12 @@ static void mbm_gprs_deactivate_primary(struct ofono_gprs_context *gc,
DBG("cid %u", cid);
if (cbd == NULL)
goto error;
cbd->user = gc;
if (g_at_chat_send(gcd->chat, "AT*ENAP=0", none_prefix,
at_enap_down_cb, cbd, g_free) > 0)
return;
error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);

View File

@ -88,7 +88,7 @@ static void mbm_stk_envelope(struct ofono_stk *stk, int length,
DBG("");
if (cbd == NULL || buf == NULL)
if (buf == NULL)
goto error;
len = sprintf(buf, "AT*STKE=\"");
@ -134,7 +134,7 @@ static void mbm_stk_terminal_response(struct ofono_stk *stk, int length,
DBG("");
if (cbd == NULL || buf == NULL)
if (buf == NULL)
goto error;
len = sprintf(buf, "AT*STKR=\"");