OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc
PATCH 1/1 OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc
dev_pm_opp_get_of_node() returns NULL when the OPP is invalid, but its kernel-doc says "else 0 on success", which was never true. Say NULL.
Fixes e2f4b5f8dc59 ("PM / OPP: Implement dev_pm_opp_get_of_node()")
Assisted-by LLM
Signed-off-by Karl Mehltretter <[email protected]>
--- drivers/opp/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/of.c +1 -1
@@ -1409,7 +1409,7 @@ bool dev_pm_opp_of_has_required_opp(struct device *dev)* dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp * @opp: opp for which DT node has to be returned for * -* Return: DT node corresponding to the opp, else 0 on success. +* Return: DT node corresponding to the opp, else NULL. * * The caller needs to put the node with of_node_put() after using it. */
Viresh Kumar
AppliedQuoted 15 lines · Karl Mehltretter
dev_pm_opp_get_of_node()returns NULL when the OPP is invalid, but its kernel-doc says "else 0 on success", which was never true. Say NULL.Fixes e2f4b5f8dc59 ("PM / OPP: Implement dev_pm_opp_get_of_node()")Assisted-by LLMSigned-off-by Karl Mehltretter <[email protected]>--- drivers/opp/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/opp/of.c +0
-0
drivers/opp/of.c bool dev_pm_opp_of_has_required_opp(struct device *dev) · line 1415
Quoted 8 lines
drivers/opp/of.c +1
-1@@ -1409,7 +1409,7 @@ bool dev_pm_opp_of_has_required_opp(struct device *dev)* dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp * @opp: opp for which DT node has to be returned for * -* Return: DT node corresponding to the opp, else 0 on success. +* Return: DT node corresponding to the opp, else NULL. * * The caller needs to put the node with of_node_put() after using it. */
Applied. Thanks.
Signature · 1 line
viresh