Re: [PATCH V2] opp: Don't ignore clk_get() errors other than -ENOENT

From: Stephen Boyd
Date: Thu Feb 11 2021 - 14:21:28 EST


Quoting Viresh Kumar (2021-01-31 20:22:58)
> Not all devices that need to use OPP core need to have clocks, a missing
> clock is fine in which case -ENOENT shall be returned by clk_get().
>
> Anything else is an error and must be handled properly.
>
> Reported-by: Dmitry Osipenko <digetx@xxxxxxxxx>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> ---
> V2:
> - s/ENODEV/ENOENT
> - Use dev_err_probe()
>
> Stephen, is the understanding correct that -ENOENT is the only error
> returned for missing clocks ?

Yeah pretty much. See clk_get_optional().