diff options
Diffstat (limited to 'drivers/huaweimodem')
-rw-r--r-- | drivers/huaweimodem/audio-settings.c | 2 | ||||
-rw-r--r-- | drivers/huaweimodem/gprs-context.c | 6 | ||||
-rw-r--r-- | drivers/huaweimodem/voicecall.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/huaweimodem/audio-settings.c b/drivers/huaweimodem/audio-settings.c index d5d3bba2..305776fb 100644 --- a/drivers/huaweimodem/audio-settings.c +++ b/drivers/huaweimodem/audio-settings.c @@ -90,7 +90,7 @@ static int huawei_audio_settings_probe(struct ofono_audio_settings *as, struct audio_settings_data *asd; asd = g_try_new0(struct audio_settings_data, 1); - if (!asd) + if (asd == NULL) return -ENOMEM; asd->chat = g_at_chat_clone(chat); diff --git a/drivers/huaweimodem/gprs-context.c b/drivers/huaweimodem/gprs-context.c index 48e21ab6..ef3d93c2 100644 --- a/drivers/huaweimodem/gprs-context.c +++ b/drivers/huaweimodem/gprs-context.c @@ -311,7 +311,7 @@ static void huawei_gprs_activate_primary(struct ofono_gprs_context *gc, DBG("cid %u", ctx->cid); - if (!cbd) + if (cbd == NULL) goto error; gcd->active_context = ctx->cid; @@ -344,7 +344,7 @@ static void huawei_gprs_deactivate_primary(struct ofono_gprs_context *gc, DBG("cid %u", cid); - if (!cbd) + if (cbd == NULL) goto error; cbd->user = gc; @@ -376,7 +376,7 @@ static int huawei_gprs_context_probe(struct ofono_gprs_context *gc, } gcd = g_try_new0(struct gprs_context_data, 1); - if (!gcd) + if (gcd == NULL) return -ENOMEM; gcd->chat = g_at_chat_clone(chat); diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c index b4174380..ff08124e 100644 --- a/drivers/huaweimodem/voicecall.c +++ b/drivers/huaweimodem/voicecall.c @@ -57,7 +57,7 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type, /* Generate a call structure for the waiting call */ call = g_try_new0(struct ofono_call, 1); - if (!call) + if (call == NULL) return NULL; call->id = id; @@ -99,7 +99,7 @@ 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) + if (cbd == NULL) goto error; if (g_at_chat_send(vd->chat, cmd, none_prefix, @@ -319,7 +319,7 @@ static void orig_notify(GAtResult *result, gpointer user_data) ofono_info("Call origin: id %d type %d", call_id, call_type); call = create_call(vc, call_type, 0, 2, NULL, 128, 2, call_id); - if (!call) { + if (call == NULL) { ofono_error("Unable to malloc, call tracking will fail!"); return; } @@ -472,7 +472,7 @@ static int huawei_voicecall_probe(struct ofono_voicecall *vc, struct voicecall_data *vd; vd = g_try_new0(struct voicecall_data, 1); - if (!vd) + if (vd == NULL) return -ENOMEM; vd->chat = g_at_chat_clone(chat); |