diff --git a/drivers/mbmmodem/gprs-context.c b/drivers/mbmmodem/gprs-context.c index b9b4574e..322f96d7 100644 --- a/drivers/mbmmodem/gprs-context.c +++ b/drivers/mbmmodem/gprs-context.c @@ -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); diff --git a/drivers/mbmmodem/stk.c b/drivers/mbmmodem/stk.c index d0a9f3b2..99c08c2d 100644 --- a/drivers/mbmmodem/stk.c +++ b/drivers/mbmmodem/stk.c @@ -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=\"");