mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bodo Eggert <harvested.in.lkml@7eggert.dyndns.org>
To: Rene Herman <rene.herman@keyaccess.nl>,
	Andrew Morton <akpm@osdl.org>,
	gregkh@suse.de, tiwai@suse.de, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: bus_add_device() losing an error return from the probe() method
Date: Mon, 27 Mar 2006 15:41:37 +0200	[thread overview]
Message-ID: <E1FNrz7-0001Cj-Nj@be1.lrz> (raw)
In-Reply-To: <5UM40-3Dy-9@gated-at.bofh.it>

Rene Herman <rene.herman@keyaccess.nl> wrote:
> Andrew Morton wrote:

>> Looks sane, but please don't sprinkle `return' statements all over a
>> function in this manner.
> 
> I actually prefer the multiple returns. You then don't have to "visually
> scroll down" to the label to see what would happen when reading the
> code. Even when there's common code before the return, I've never seen
> GCC not optimise that to the goto form itself. You obviously the boss
> though.

I tried both, and I found out that having multiple non-trivial points of
return enables you to easily create a lot of bugs.
-- 
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.

       reply	other threads:[~2006-03-27 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5TNbU-7Xn-17@gated-at.bofh.it>
     [not found] ` <5UsI5-Wf-9@gated-at.bofh.it>
     [not found]   ` <5UM40-3Dy-9@gated-at.bofh.it>
2006-03-27 13:41     ` Bodo Eggert [this message]
2006-03-24  5:32 Rene Herman
2006-03-26  1:53 ` Andrew Morton
2006-03-26 22:30   ` Rene Herman

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=E1FNrz7-0001Cj-Nj@be1.lrz \
    --to=harvested.in.lkml@7eggert.dyndns.org \
    --cc=7eggert@gmx.de \
    --cc=akpm@osdl.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®