All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com>
To: ofono@ofono.org
Subject: [PATCH 03/11] calypsomodem: remove NULL check
Date: Sat, 29 Jan 2011 05:34:36 -0800	[thread overview]
Message-ID: <1296308084-3726-4-git-send-email-jeevaka.badrappan@elektrobit.com> (raw)
In-Reply-To: <1296308084-3726-1-git-send-email-jeevaka.badrappan@elektrobit.com>

[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]

---
 drivers/calypsomodem/stk.c       |    4 ++--
 drivers/calypsomodem/voicecall.c |    4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c
index 196b9e3..83287f9 100644
--- a/drivers/calypsomodem/stk.c
+++ b/drivers/calypsomodem/stk.c
@@ -101,7 +101,7 @@ static void calypso_stk_envelope(struct ofono_stk *stk, int length,
 
 	DBG("");
 
-	if (cbd == NULL || buf == NULL)
+	if (buf == NULL)
 		goto error;
 
 	len = sprintf(buf, "AT%%SATE=\"");
@@ -148,7 +148,7 @@ static void calypso_stk_terminal_response(struct ofono_stk *stk, int length,
 
 	DBG("");
 
-	if (cbd == NULL || buf == NULL)
+	if (buf == NULL)
 		goto error;
 
 	len = sprintf(buf, "AT%%SATR=\"");
diff --git a/drivers/calypsomodem/voicecall.c b/drivers/calypsomodem/voicecall.c
index 204ed14..01be990 100644
--- a/drivers/calypsomodem/voicecall.c
+++ b/drivers/calypsomodem/voicecall.c
@@ -64,14 +64,10 @@ static void calypso_template(struct ofono_voicecall *vc, const char *cmd,
 	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 	struct cb_data *cbd = cb_data_new(cb, data);
 
-	if (cbd == NULL)
-		goto error;
-
 	if (g_at_chat_send(vd->chat, cmd, none_prefix,
 				calypso_generic_cb, cbd, g_free) > 0)
 		return;
 
-error:
 	g_free(cbd);
 
 	CALLBACK_WITH_FAILURE(cb, data);
-- 
1.7.0.4


  parent reply	other threads:[~2011-01-29 13:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29 13:34 [PATCH 00/11] Remove NULL check for call back data Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 01/11] atutil: use g_new0 for callback data memory Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 02/11] atmodem: remove NULL check Jeevaka Badrappan
2011-01-29 13:34 ` Jeevaka Badrappan [this message]
2011-01-29 13:34 ` [PATCH 04/11] hfpmodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 05/11] hsomodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 06/11] huaweimodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 07/11] ifxmodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 08/11] mbmmodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 09/11] stemodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 10/11] cdmamodem: " Jeevaka Badrappan
2011-01-29 13:34 ` [PATCH 11/11] plugins: " Jeevaka Badrappan
2011-01-29 17:23 ` [PATCH 00/11] Remove NULL check for call back data Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296308084-3726-4-git-send-email-jeevaka.badrappan@elektrobit.com \
    --to=jeevaka.badrappan@elektrobit.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.