[PATCH 01/10] Add a common struct clk

Jeremy Kerr
2011-05-02T01:09:46Z

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