Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Slawomir Bochenski <lkslawek@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] Add messages backend initialization and finalization
Date: Wed, 25 May 2011 13:40:48 -0700	[thread overview]
Message-ID: <20110525204048.GC18794@dell.amr.corp.intel.com> (raw)
In-Reply-To: <1306159280-19889-1-git-send-email-lkslawek@gmail.com>

Hi Slawek,

On Mon, May 23, 2011, Slawomir Bochenski wrote:
> +	err = messages_init();
> +	if (err < 0)
> +		goto failed_messages_init;
> +
>  	err = obex_mime_type_driver_register(&mime_map);
>  	if (err < 0)
>  		goto failed_mime;
> @@ -275,6 +279,9 @@ failed_mas_reg:
>  	obex_mime_type_driver_unregister(&mime_map);
>  
>  failed_mime:
> +	messages_exit();
> +
> +failed_messages_init:
>  	return err;
>  }

In this case it'd be simpler to do the following instead of adding the
new label:

	if (err < 0)
		return err;

If there was more complex cleanup involved then the new label would make
sense, but not really with a simple return statement.

Johan

  parent reply	other threads:[~2011-05-25 20:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 14:01 [PATCH 1/2] Add messages backend initialization and finalization Slawomir Bochenski
2011-05-23 14:01 ` [PATCH 2/2] Add MAP session management and SetFolder function Slawomir Bochenski
2011-05-25 20:40 ` Johan Hedberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-23 13:56 [PATCH 0/2] Message Access Profile, cont Slawomir Bochenski
2011-03-23 13:56 ` [PATCH 1/2] Add messages backend initialization and finalization Slawomir Bochenski

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=20110525204048.GC18794@dell.amr.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lkslawek@gmail.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