linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Syam Sidhardhan <s.syam@samsung.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 10/12] adapter: Remove unwanted if check and code
Date: Wed, 23 May 2012 15:02:52 -0300	[thread overview]
Message-ID: <20120523180252.GB32263@samus> (raw)
In-Reply-To: <1337788652-23697-11-git-send-email-s.syam@samsung.com>

Hi Syam,

On 21:27 Wed 23 May, Syam Sidhardhan wrote:
> Here the variable agent never be NULL, so no need to check it
> against NULL.
> ---
>  src/adapter.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/src/adapter.c b/src/adapter.c
> index 18dd5b6..16d379c 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -1618,9 +1618,6 @@ static DBusMessage *register_agent(DBusConnection *conn, DBusMessage *msg,
>  
>  	agent = agent_create(adapter, name, path, cap,
>  				(agent_remove_cb) agent_removed, adapter);
> -	if (!agent)
> -		return btd_error_failed(msg, "Failed to create a new agent");
> -

While you are at it, you could remove the "agent" variable.

Apart from this, the series looks good.

>  	adapter->agent = agent;
>  
>  	DBG("Agent registered for hci%d at %s:%s", adapter->dev_id, name,
> -- 
> 1.7.4.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers,
-- 
Vinicius

  reply	other threads:[~2012-05-23 18:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 15:57 [PATCH BlueZ 00/12] Redundant D-Bus error init, remove unwanted code, g_free missmatch etc Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 01/12] monitor: Fix memory leak Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 02/12] storage: Use g_free() instead of free() Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 03/12] media: Remove redundant D-Bus error initilization Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 04/12] telephony-maemo5: Remove redundant D-Bus error initilizations Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 05/12] telephony-maemo6: Remove redundant D-Bus error initilization Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 06/12] telephony-ofono: " Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 07/12] agent: Remove redundant D-Bus error initilizations Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 08/12] Remove redundant D-Bus error initilization in maemo6 plugin Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 09/12] avctp: Fix NULL check after dereference Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 10/12] adapter: Remove unwanted if check and code Syam Sidhardhan
2012-05-23 18:02   ` Vinicius Costa Gomes [this message]
2012-05-23 15:57 ` [PATCH BlueZ 11/12] audio: Remove unwanted code from manager Syam Sidhardhan
2012-05-23 15:57 ` [PATCH BlueZ 12/12] input: Remove unwanted codes from device Syam Sidhardhan
2012-05-24  8:10 ` [PATCH BlueZ 00/12] Redundant D-Bus error init, remove unwanted code, g_free missmatch etc Johan Hedberg

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=20120523180252.GB32263@samus \
    --to=vinicius.gomes@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=s.syam@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).