[PATCH V2 2/3] clk: Improve errorhandling for clk_set_parent
Ulf Hansson
ulf.hansson at linaro.org
Fri Mar 22 07:13:44 EDT 2013
On 21 March 2013 22:00, Mike Turquette <mturquette at linaro.org> wrote:
> Quoting Ulf Hansson (2013-03-21 06:48:12)
>> @@ -1344,8 +1341,9 @@ out:
>> int clk_set_parent(struct clk *clk, struct clk *parent)
>> {
>> int ret = 0;
>> + u8 p_index;
>>
>> - if (!clk || !clk->ops)
>> + if (!clk || !clk->ops || !parent)
>> return -EINVAL;
>>
>
> A NULL clock is valid according to the clk.h api. I would like to allow
> parent to be NULL, resulting in a migration from the real clock tree to
> the orphans list.
Sorry, did not think of this. Will correct.
>
> This feature was apparently buggy for some time and Rajagopal sent me a
> patch off-list to fix it. Rajagopal, can you post your patch publicly?
So, that is also why I removed this. Anyway, I guess it is somewhat
easier for me to make a fixup so we can accept NULL as parents. I give
it a try.
>
> Thanks,
> Mike
More information about the linux-arm-kernel
mailing list