mirror of git://git.sysmocom.de/ofono
calypsomodem: remove NULL check
This commit is contained in:
parent
4258fb5915
commit
b6331608c2
|
@ -101,7 +101,7 @@ static void calypso_stk_envelope(struct ofono_stk *stk, int length,
|
||||||
|
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
if (cbd == NULL || buf == NULL)
|
if (buf == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
len = sprintf(buf, "AT%%SATE=\"");
|
len = sprintf(buf, "AT%%SATE=\"");
|
||||||
|
@ -148,7 +148,7 @@ static void calypso_stk_terminal_response(struct ofono_stk *stk, int length,
|
||||||
|
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
if (cbd == NULL || buf == NULL)
|
if (buf == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
len = sprintf(buf, "AT%%SATR=\"");
|
len = sprintf(buf, "AT%%SATR=\"");
|
||||||
|
|
|
@ -64,14 +64,10 @@ static void calypso_template(struct ofono_voicecall *vc, const char *cmd,
|
||||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||||
struct cb_data *cbd = cb_data_new(cb, data);
|
struct cb_data *cbd = cb_data_new(cb, data);
|
||||||
|
|
||||||
if (cbd == NULL)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (g_at_chat_send(vd->chat, cmd, none_prefix,
|
if (g_at_chat_send(vd->chat, cmd, none_prefix,
|
||||||
calypso_generic_cb, cbd, g_free) > 0)
|
calypso_generic_cb, cbd, g_free) > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
|
||||||
g_free(cbd);
|
g_free(cbd);
|
||||||
|
|
||||||
CALLBACK_WITH_FAILURE(cb, data);
|
CALLBACK_WITH_FAILURE(cb, data);
|
||||||
|
|
Loading…
Reference in New Issue