Re: [PATCH 3/3] regulator: core: make regulator_register() EPROBE_DEFER aware

From: Dmitry Torokhov
Date: Tue Sep 17 2019 - 20:57:15 EST


On Tue, Sep 17, 2019 at 4:42 PM Marco Felsch <m.felsch@xxxxxxxxxxxxxx> wrote:
>
> Sometimes it can happen that the regulator_of_get_init_data() can't
> retrieve the config due to a not probed device the regulator depends on.
> Fix that by checking the return value of of_parse_cb() and return
> EPROBE_DEFER in such cases.

Treating EPROBE_DEFER in a special way is usually wrong.
regulator_of_get_init_data() may fail for multiple reasons (no memory,
invalid DT, etc, etc). All of them should abort instantiating
regulator.

Thanks.

--
Dmitry