summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem/call-volume.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atmodem/call-volume.c')
-rw-r--r--drivers/atmodem/call-volume.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/atmodem/call-volume.c b/drivers/atmodem/call-volume.c
index d3910d43..6d87276d 100644
--- a/drivers/atmodem/call-volume.c
+++ b/drivers/atmodem/call-volume.c
@@ -138,9 +138,6 @@ static void at_call_volume_speaker_volume(struct ofono_call_volume *cv,
char buf[64];
int level;
- if (cbd == NULL)
- goto error;
-
level = ((cvd->clvl_max - cvd->clvl_min) *
percent) / 100 + cvd->clvl_min;
@@ -150,7 +147,6 @@ static void at_call_volume_speaker_volume(struct ofono_call_volume *cv,
cv_generic_set_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
@@ -163,16 +159,12 @@ static void at_call_volume_mute(struct ofono_call_volume *cv, int muted,
struct cb_data *cbd = cb_data_new(cb, data);
char buf[64];
- if (cbd == NULL)
- goto error;
-
snprintf(buf, sizeof(buf), "AT+CMUT=%d", muted);
if (g_at_chat_send(cvd->chat, buf, none_prefix,
cv_generic_set_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);