From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com,
Kay Sievers <kay.sievers@vrfy.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] devres: WARN() and return, don't crash on device_del() of uninitialized device
Date: Wed, 27 May 2009 08:23:30 +1000 [thread overview]
Message-ID: <1243376610.17847.12.camel@pasglop> (raw)
In-Reply-To: <20090526141552.507f8821.akpm@linux-foundation.org>
On Tue, 2009-05-26 at 14:15 -0700, Andrew Morton wrote:
>
> This could be coded a little more neatly as:
>
> /* Looks like an uninitialized device structure */
> if (WARN_ON(dev->devres_head.next == NULL))
> return -ENODEV;
Oh I didn't know we could do that nowadays...
Cheers,
Ben.
prev parent reply other threads:[~2009-05-26 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 6:53 [PATCH] devres: WARN() and return, don't crash on device_del() of uninitialized device Benjamin Herrenschmidt
2009-05-26 21:15 ` Andrew Morton
2009-05-26 22:23 ` Benjamin Herrenschmidt [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=1243376610.17847.12.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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).