summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem/call-volume.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-29 05:34:37 -0800
committerMarcel Holtmann <marcel@holtmann.org>2011-01-29 18:39:37 +0100
commit0f4b44d5cf8da4870b84a4efe82105a3b95f16c7 (patch)
tree7da503028384417e83305e902dedb7ca8b8f37a8 /drivers/hfpmodem/call-volume.c
parentb6331608c2e206b3bf4864d617c7f42fbf2768c2 (diff)
downloadofono-0f4b44d5cf8da4870b84a4efe82105a3b95f16c7.tar.bz2
hfpmodem: remove NULL check
Diffstat (limited to 'drivers/hfpmodem/call-volume.c')
-rw-r--r--drivers/hfpmodem/call-volume.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/hfpmodem/call-volume.c b/drivers/hfpmodem/call-volume.c
index 19f57c49..ee4e3520 100644
--- a/drivers/hfpmodem/call-volume.c
+++ b/drivers/hfpmodem/call-volume.c
@@ -73,9 +73,6 @@ static void hfp_speaker_volume(struct ofono_call_volume *cv,
struct cb_data *cbd = cb_data_new(cb, data);
char buf[64];
- if (cbd == NULL)
- goto error;
-
vd->sp_volume = percent;
snprintf(buf, sizeof(buf), "AT+VGS=%d",
@@ -85,7 +82,6 @@ static void hfp_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);
@@ -100,9 +96,6 @@ static void hfp_microphone_volume(struct ofono_call_volume *cv,
struct cb_data *cbd = cb_data_new(cb, data);
char buf[64];
- if (cbd == NULL)
- goto error;
-
vd->mic_volume = percent;
snprintf(buf, sizeof(buf), "AT+VGM=%d",
@@ -112,7 +105,6 @@ static void hfp_microphone_volume(struct ofono_call_volume *cv,
cv_generic_set_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);