From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi: tegra: don't treat NULL clk as an error
Date: Mon, 10 Jan 2011 22:25:24 +0000 [thread overview]
Message-ID: <20110110222524.GE12552@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110110221802.GD12552@n2100.arm.linux.org.uk>
On Mon, Jan 10, 2011 at 10:18:02PM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 10, 2011 at 01:58:12PM -0700, Grant Likely wrote:
> > On Mon, Jan 10, 2011 at 4:05 AM, Jamie Iles <jamie@jamieiles.com> wrote:
> > > Some platforms have been known to return NULL from clk_get() if they
> > > support only a single struct clk. ?Whilst tegra doesn't do this, make
> > > the drivers consistent with others.
> > >
> > > Cc: Erik Gilling <konkers@android.com>
> > > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> >
> > Hi James,
> >
> > If NULL does get returned, say due to a future change to the clock
> > code, then this change causes the driver to oops. I'm not going to
> > apply this patch.
>
> Please apply it - the clock API just defines struct clk as a cookie
> where errors are IS_ERR/PTR_ERR. Other values must be considered by
> drivers as perfectly valid, including NULL.
Also note that drivers have no business ever dereferencing struct clks.
So if they oops, that's their own fault for dereferencing something
that they shouldn't.
next prev parent reply other threads:[~2011-01-10 22:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 11:05 [PATCH] spi: tegra: don't treat NULL clk as an error Jamie Iles
2011-01-10 20:58 ` Grant Likely
2011-01-10 22:18 ` Russell King - ARM Linux
2011-01-10 22:25 ` Russell King - ARM Linux [this message]
2011-01-10 23:24 ` Grant Likely
2011-01-10 23:30 ` Russell King - ARM Linux
2011-01-10 23:43 ` Grant Likely
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=20110110222524.GE12552@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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