cb_data_new() uses g_new0(), hence there's no need to check the return
value being NULL.
---
 drivers/mbmmodem/location-reporting.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/mbmmodem/location-reporting.c 
b/drivers/mbmmodem/location-reporting.c
index b76a5c2..1080e62 100644
--- a/drivers/mbmmodem/location-reporting.c
+++ b/drivers/mbmmodem/location-reporting.c
@@ -166,16 +166,12 @@ static void mbm_location_reporting_enable(struct 
ofono_location_reporting *lr,
 
        DBG("lr=%p", lr);
 
-       if (cbd == NULL)
-               goto out;
-
        cbd->user = lr;
 
        if (g_at_chat_send(gd->chat, "AT*E2GPSCTL=1,5,1", none_prefix,
                                mbm_e2gpsctl_enable_cb, cbd, g_free) > 0)
                return;
 
-out:
        CALLBACK_WITH_FAILURE(cb, -1, data);
        g_free(cbd);
 }
-- 
1.7.4.1

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

Reply via email to