mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
clk: Add comment about __of_clk_get_by_name() error values
It's not immediately obvious from the code that failure to get a clock provider can return either -ENOENT or -EINVAL. Therefore, add a comment to highlight this. Signed-off-by: Phil Edworthy <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: Russell King <[email protected]> [[email protected]: Fix comment to be proper C with ==] Signed-off-by: Stephen Boyd <[email protected]>
This commit is contained in:
committed by
Stephen Boyd
parent
bfeffd1552
commit
5c56dfe63b
@@ -52,6 +52,12 @@ struct clk *of_clk_get(struct device_node *np, int index)
|
||||
}
|
||||
EXPORT_SYMBOL(of_clk_get);
|
||||
|
||||
/*
|
||||
* Beware the return values when np is valid, but no clock provider is found.
|
||||
* If name == NULL, the function returns -ENOENT.
|
||||
* If name != NULL, the function returns -EINVAL. This is because __of_clk_get()
|
||||
* is called even if of_property_match_string() returns an error.
|
||||
*/
|
||||
static struct clk *__of_clk_get_by_name(struct device_node *np,
|
||||
const char *dev_id,
|
||||
const char *name)
|
||||
|
||||
Reference in New Issue
Block a user