diff options
author | Lucas Stach <dev@lynxeye.de> | 2022-01-16 22:32:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-01-18 08:30:12 +0100 |
commit | 2f9aeab92f51d7b224468f6cd62d7cbbb05ceb1e (patch) | |
tree | caa7e4689f28a9a58f4eeddae4797956bb357bbd /drivers/clk | |
parent | 98159be6aa9fb7980244c2ef5f3a1665cdcb05e5 (diff) | |
download | barebox-2f9aeab92f51d7b224468f6cd62d7cbbb05ceb1e.tar.gz barebox-2f9aeab92f51d7b224468f6cd62d7cbbb05ceb1e.tar.xz |
clk: ignore of_device_ensure_probed error in clock lookup
For CLK_OF_DECLARE clocks there is no driver that is bound to the device,
so the lookup fails before even trying to find the provider, breaking
the parent_ready() logic used when initializing the declared providers.
Ignore the return code from of_device_ensure_probed to allow the lookup
to proceed as usual. If of_device_ensure_probed the lookup will also fail,
as no provider will be found.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220116213221.3466936-1-dev@lynxeye.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 189c9c62df..a1d1d7f1a4 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -643,11 +643,9 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec) { struct of_clk_provider *provider; struct clk *clk = ERR_PTR(-EPROBE_DEFER); - int ret; - ret = of_device_ensure_probed(clkspec->np); - if (ret) - return ERR_PTR(ret); + /* Ignore error, as CLK_OF_DECLARE clocks have no proper driver. */ + of_device_ensure_probed(clkspec->np); /* Check if we have such a provider in our array */ list_for_each_entry(provider, &of_clk_providers, link) { |