From: Andrew Morton <akpm@linux-foundation.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/5] SDIO: introduce API for special power management features
Date: Thu, 11 Feb 2010 12:32:51 -0800 [thread overview]
Message-ID: <20100211123251.f77dbddd.akpm@linux-foundation.org> (raw)
In-Reply-To: <1265747366-6676-2-git-send-email-nico@fluxnic.net>
On Tue, 09 Feb 2010 15:29:22 -0500
Nicolas Pitre <nico@fluxnic.net> wrote:
> + BUG_ON(!func);
> + BUG_ON(!func->card);
> +
> + host = func->card->host;
It's a bit redundant to check for null and then deref the pointer - the
kernel will reliably oops on the NULL deref, which gives us the same
info.
I guess the BUG_ON is more useful in the case where a double-deref is
being performed, as it can otherwise be a bit hard to work out which
pointer was NULL.
next prev parent reply other threads:[~2010-02-11 20:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 20:29 [PATCH 0/5] SDIO support for "powered" suspend Nicolas Pitre
2010-02-09 20:29 ` [PATCH 1/5] SDIO: introduce API for special power management features Nicolas Pitre
2010-02-11 20:32 ` Andrew Morton [this message]
2010-02-11 20:57 ` Nicolas Pitre
2010-02-09 20:29 ` [PATCH 2/5] SDIO: sdhci support for suspend mode PM features Nicolas Pitre
2010-02-09 20:29 ` [PATCH 3/5] SDIO: Don't use CMD[357] as part of a powered SDIO resume Nicolas Pitre
2010-02-09 20:29 ` [PATCH 4/5] SDIO: kick the interrupt thread upon a resume Nicolas Pitre
2010-02-09 20:29 ` [PATCH 5/5] SDIO: put active devices into 1-bit mode during suspend Nicolas Pitre
2010-02-10 11:30 ` David Vrabel
2010-02-10 15:17 ` Chris Ball
2010-02-10 16:03 ` David Vrabel
2010-02-10 16:32 ` Chris Ball
2010-02-10 16:49 ` David Vrabel
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=20100211123251.f77dbddd.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nico@fluxnic.net \
/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