From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, dragos.carp@toptica.com
Subject: Re: [PATCH V3] [POWERPC] Add common clock setting routine mpc52xx_psc_set_clkdiv()
Date: Thu, 10 Jan 2008 08:01:09 -0700 [thread overview]
Message-ID: <fa686aa40801100701q7454d8d0o8542ce9cc10f3bfb@mail.gmail.com> (raw)
In-Reply-To: <20080110181316.1213f273.sfr@canb.auug.org.au>
On 1/10/08, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> On Wed, 09 Jan 2008 22:26:30 -0700 Grant Likely <grant.likely@secretlab.ca> wrote:
> >
> > +mpc52xx_map_common_devices(void)
> > {
>
> > + /* Clock Distribution Module, used by PSC clock setting function */
> > + np = of_find_matching_node(NULL, mpc52xx_cdm_ids);
>
> What happens if we find no node?
Both of_iomap and of_put fail gracefully if np is NULL. IIRC that was
done on purpose so this exact thing could be done.
Users of mpc52xx_cdm (and the others done in this style) all check for
mpc52xx_cdm being NULL before dereferencing.
>
> > + mpc52xx_cdm = of_iomap(np, 0);
> > + of_node_put(np);
> > }
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-01-10 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 5:26 [PATCH V3] [POWERPC] Add common clock setting routine mpc52xx_psc_set_clkdiv() Grant Likely
2008-01-10 7:13 ` Stephen Rothwell
2008-01-10 15:01 ` Grant Likely [this message]
2008-01-10 23:41 ` Stephen Rothwell
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=fa686aa40801100701q7454d8d0o8542ce9cc10f3bfb@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=dragos.carp@toptica.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfr@canb.auug.org.au \
/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).