---
 drivers/cdmamodem/devinfo.c   |   16 ----------------
 drivers/cdmamodem/voicecall.c |    4 ----
 2 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/drivers/cdmamodem/devinfo.c b/drivers/cdmamodem/devinfo.c
index dfc7fd5..9603e05 100644
--- a/drivers/cdmamodem/devinfo.c
+++ b/drivers/cdmamodem/devinfo.c
@@ -65,15 +65,11 @@ static void cdma_query_manufacturer(struct ofono_devinfo 
*info,
        struct cb_data *cbd = cb_data_new(cb, data);
        GAtChat *chat = ofono_devinfo_get_data(info);
 
-       if (cbd == NULL)
-               goto error;
-
        cbd->user = "AT+GMI";
 
        if (g_at_chat_send(chat, "AT+GMI", NULL, attr_cb, cbd, g_free) > 0)
                return;
 
-error:
        g_free(cbd);
 
        CALLBACK_WITH_FAILURE(cb, NULL, data);
@@ -85,15 +81,11 @@ static void cdma_query_model(struct ofono_devinfo *info,
        struct cb_data *cbd = cb_data_new(cb, data);
        GAtChat *chat = ofono_devinfo_get_data(info);
 
-       if (cbd == NULL)
-               goto error;
-
        cbd->user = "AT+GMM";
 
        if (g_at_chat_send(chat, "AT+GMM", NULL, attr_cb, cbd, g_free) > 0)
                return;
 
-error:
        g_free(cbd);
 
        CALLBACK_WITH_FAILURE(cb, NULL, data);
@@ -105,15 +97,11 @@ static void cdma_query_revision(struct ofono_devinfo *info,
        struct cb_data *cbd = cb_data_new(cb, data);
        GAtChat *chat = ofono_devinfo_get_data(info);
 
-       if (cbd == NULL)
-               goto error;
-
        cbd->user = "AT+GMR";
 
        if (g_at_chat_send(chat, "AT+GMR", NULL, attr_cb, cbd, g_free) > 0)
                return;
 
-error:
        g_free(cbd);
 
        CALLBACK_WITH_FAILURE(cb, NULL, data);
@@ -125,15 +113,11 @@ static void cdma_query_serial(struct ofono_devinfo *info,
        struct cb_data *cbd = cb_data_new(cb, data);
        GAtChat *chat = ofono_devinfo_get_data(info);
 
-       if (cbd == NULL)
-               goto error;
-
        cbd->user = "AT+GSN";
 
        if (g_at_chat_send(chat, "AT+GSN", NULL, attr_cb, cbd, g_free) > 0)
                return;
 
-error:
        g_free(cbd);
 
        CALLBACK_WITH_FAILURE(cb, NULL, data);
diff --git a/drivers/cdmamodem/voicecall.c b/drivers/cdmamodem/voicecall.c
index 94ec74b..cabed6a 100644
--- a/drivers/cdmamodem/voicecall.c
+++ b/drivers/cdmamodem/voicecall.c
@@ -54,16 +54,12 @@ static void cdma_template(const char *cmd, struct 
ofono_cdma_voicecall *vc,
        struct voicecall_data *vd = ofono_cdma_voicecall_get_data(vc);
        struct cb_data *cbd = cb_data_new(cb, data);
 
-       if (cbd == NULL)
-               goto error;
-
        cbd->user = vc;
 
        if (g_at_chat_send(vd->chat, cmd, none_prefix,
                                result_cb, cbd, g_free) > 0)
                return;
 
-error:
        g_free(cbd);
 
        CALLBACK_WITH_FAILURE(cb, data);
-- 
1.7.0.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to