summaryrefslogtreecommitdiff
path: root/drivers/timer/timer-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/timer/timer-uclass.c')
-rw-r--r--drivers/timer/timer-uclass.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 62d6f0b29a..45397b230f 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -92,6 +92,13 @@ int notrace dm_timer_init(void)
if (gd->timer)
return 0;
+ /*
+ * Directly access gd->dm_root to suppress error messages, if the
+ * virtual root driver does not yet exist.
+ */
+ if (gd->dm_root == NULL)
+ return -EAGAIN;
+
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
/* Check for a chosen timer to be used for tick */
node = ofnode_get_chosen_node("tick-timer");