[PATCH] clk: also return NULL for -ENOENT in devm_clk_get_optional functions
Yang Xiwen
forbidden405 at outlook.com
Mon Jul 24 19:57:56 CEST 2023
On 7/25/2023 1:34 AM, Fabio Estevam wrote:
> On Mon, Jul 24, 2023 at 2:32 PM Yang Xiwen via B4 Relay
> <devnull+forbidden405.outlook.com at kernel.org> wrote:
>> From: Yang Xiwen <forbidden405 at outlook.com>
>>
>> As described by the doc.
> Which doc? Please mention the details in the commit log.
It's in the source annotation of devm_clk_get_optional. The annotation
says -ENOENT should be handled, but the code doesn't. It handles
-ENODATA instead, which confuses me a lot.
The optional functions are introduced to simplify clock consumer's code
so that they can assume the struct clk * returned by these functional
are either valid or NULL. Not handling ENOENT is not the intended case.
--
Regards,
Yang Xiwen
More information about the U-Boot
mailing list