
24 Jul
2023
24 Jul
'23
7:57 p.m.
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@kernel.org wrote:
From: Yang Xiwen forbidden405@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