[PATCH 01/10] Add a common struct clk
Jeremy Kerr
jeremy.kerr at canonical.com
Sun May 1 21:09:46 EDT 2011
Hi Rob,
> > +int clk_prepare(struct clk *clk)
> > +{
> > + int ret = 0;
> > +
>
> Shouldn't all these functions have some clk pointer checks:
>
> if (IS_ERR_OR_NULL(clk))
> return -EINVAL;
>
No, I'd prefer not to. The driver code should be responsible for passing
a valid pointer here, by doing this check once (where the clock is
initially acquired through clk_get), rather than the core code doing it
on each function call.
Cheers,
Jeremy
More information about the linux-arm-kernel
mailing list