Re: [PATCH] clk: Make of_parse_clkspec() return -ENOENT on errors

From: Stephen Boyd
Date: Mon Aug 26 2019 - 17:06:48 EST


Hrmm.. the subject is misleading. Let me reword it and resend.

Quoting Stephen Boyd (2019-08-19 15:29:15)
> The return value of of_parse_clkspec() is peculiar. If the function is
> called with a NULL argument for 'name' it will return -ENOENT, but if
> it's called with a non-NULL argument for 'name' it will return -EINVAL.
> This peculiarity is documented by commit 5c56dfe63b6e ("clk: Add comment
> about __of_clk_get_by_name() error values").
>
> Let's further document this function so that it's clear what the return
> value is and how to use the arguments to parse clk specifiers.
>
> Cc: Phil Edworthy <phil.edworthy@xxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>