From 69f6a77d785832686ca374eda88934e14fd29b28 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 3 Dec 2015 11:38:36 -0600 Subject: rilmodem: use g_new0 instead of g_try_new0 --- drivers/rilmodem/voicecall.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/rilmodem/voicecall.c b/drivers/rilmodem/voicecall.c index 663d48f5..2f8c1a06 100644 --- a/drivers/rilmodem/voicecall.c +++ b/drivers/rilmodem/voicecall.c @@ -236,15 +236,13 @@ no_calls: } else { /* Get disconnect cause before calling core */ struct lastcause_req *reqdata = - g_try_new0(struct lastcause_req, 1); - if (reqdata != NULL) { - reqdata->vc = user_data; - reqdata->id = oc->id; - - g_ril_send(vd->ril, reqid, NULL, - lastcause_cb, reqdata, - g_free); - } + g_new0(struct lastcause_req, 1); + + reqdata->vc = user_data; + reqdata->id = oc->id; + + g_ril_send(vd->ril, reqid, NULL, + lastcause_cb, reqdata, g_free); } clear_dtmf_queue(vd); -- cgit v1.2.3