From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] ngene: remove an unneeded condition
Date: Sun, 29 Apr 2012 13:46:51 +0000 [thread overview]
Message-ID: <20120429134651.GC13883@mwanda> (raw)
In-Reply-To: <20120420131502.GB26339@elgon.mountain>
On Sat, Apr 28, 2012 at 06:23:58PM +0200, walter harms wrote:
> i agree but in this special case it looks strange. Would that more
> readable ?
>
> if (stat < 0)
> {
> <errorhandling here>
> return stat;
> }
>
> return 0:
>
No. Gotos are perfectly fine for unwinding in the error handling
code. In this case there are several in a row. Copy and pasting
the error handling leads to forgot to add a kfree() bugs.
It doesn't look weird at all, it looks like the most normal kind of
error handling there is in the kernel.
regards,
dan carpenter
prev parent reply other threads:[~2012-04-29 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 13:15 [patch] [media] ngene: remove an unneeded condition Dan Carpenter
2012-04-28 14:57 ` walter harms
2012-04-28 15:16 ` Dan Carpenter
2012-04-28 16:23 ` walter harms
2012-04-29 13:46 ` Dan Carpenter [this message]
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=20120429134651.GC13883@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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 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).