[PATCH v7 08/14] pmdomain: Make genpd_get_from_provider() return -EPROBE_DEFER
Wolfram Sang
wsa+renesas at sang-engineering.com
Wed Dec 2 01:54:23 PST 2026
On Mon, Nov 30, 2026 at 02:12:39PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas at glider.be>
>
> Unlike provider-based look-up functions in other subsystems[1],
> genpd_get_from_provider() returns -ENOENT instead of -EPROBE_DEFER when
> the provider is not found, thus not supporting probe deferral.
> Currently this is worked around in of_genpd_add_subdomain() by remapping
> -ENOENT[2].
>
> Fix this for all current and future callers by returning -EPROBE_DEFER
> instead, and drop the no longer needed remapping code.
>
> Note that other callsites either don't care about the actual error code,
> or propagate it up. The latter (e.g. of_genpd_add_child_ids()) thus may
> start returning -EPROBE_DEFER, which should be fine.
Not only fine, but also consistent. Plus, the new code is easier to
understand.
>
> [1] of_clk_get_hw_from_clkspec(), __fwnode_reset_control_get()),
> [2] Commit 18027d6f392ee8d8 ("PM: domains: Make of_genpd_add_subdomain()
> return -EPROBE_DEFER").
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> Tested-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
More information about the linux-arm-kernel
mailing list