[PATCH 01/10] Add a common struct clk
From: Jeremy Kerr <hidden>
Date: 2011-05-02 01:09:46
From: Jeremy Kerr <hidden>
Date: 2011-05-02 01:09:46
Hi Rob,
quoted
+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