From: Wim Van Sebroeck <wim@iguana.be>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: roel.kluin@gmail.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] txx9wdt.c:52: Fix txx9wdt_probe() cleaning up after errors
Date: Thu, 27 Aug 2009 22:13:17 +0200 [thread overview]
Message-ID: <20090827201317.GH29382@infomag.iguana.be> (raw)
In-Reply-To: <20090827.235200.21363768.anemo@mba.ocn.ne.jp>
Hi Atsushi,
> > Make txx9wdt_probe() clean up after errors.
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > Any comments?
>
> Well, why is this patch needed? I intentionally omitted iounmap and
> release_mem_region because devres guarantee these resources are freed
> on probe failure. Or are there any leaks?
My opinion: a driver should do proper clean-up on probe failures because
1) this makes clean and robust code and shows that you know what you are doing
2) to avoid having to search for leaks if there are any. See the NULL pointer story...
Kind regards,
Wim.
next prev parent reply other threads:[~2009-08-27 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 9:20 Roel Kluin
2009-08-25 20:08 ` Wim Van Sebroeck
2009-08-27 14:52 ` Atsushi Nemoto
2009-08-27 20:13 ` Wim Van Sebroeck [this message]
2009-08-28 14:24 ` Atsushi Nemoto
2009-08-31 12:02 ` Wim Van Sebroeck
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=20090827201317.GH29382@infomag.iguana.be \
--to=wim@iguana.be \
--cc=akpm@linux-foundation.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@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
all inboxes | Powered by JetHome®