[PATCH 5.3 02/25] clocksource/drivers/timer-of: Do not warn on deferred probe

From: Greg Kroah-Hartman
Date: Sun Sep 29 2019 - 10:03:01 EST


From: Jon Hunter <jonathanh@xxxxxxxxxx>

commit 763719771e84b8c8c2f53af668cdc905faa608de upstream.

Deferred probe is an expected return value for clk_get() on many
platforms. The driver deals with it properly, so there's no need
to output a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/clocksource/timer-of.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -113,8 +113,10 @@ static __init int timer_of_clk_init(stru
of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
of_clk_get(np, of_clk->index);
if (IS_ERR(of_clk->clk)) {
- pr_err("Failed to get clock for %pOF\n", np);
- return PTR_ERR(of_clk->clk);
+ ret = PTR_ERR(of_clk->clk);
+ if (ret != -EPROBE_DEFER)
+ pr_err("Failed to get clock for %pOF\n", np);
+ goto out;
}

ret = clk_prepare_enable(of_clk->clk);