When the device not binded with a node, we need ignore
the parents and rate settings.

Cc: Simon Glass <s...@chromium.org>
Cc: Jagan Teki <ja...@amarulasolutions.com>
Cc: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
Cc: Neil Armstrong <narmstr...@baylibre.com>
Cc: Andreas Dannenberg <dannenb...@ti.com>
Signed-off-by: Peng Fan <peng....@nxp.com>
---
 drivers/clk/clk-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 5acf186b01..39c6a97caa 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -283,6 +283,9 @@ int clk_set_defaults(struct udevice *dev)
 {
        int ret;
 
+       if (!dev_of_valid(dev))
+               return 0;
+
        /* If this not in SPL and pre-reloc state, don't take any action. */
        if (!(IS_ENABLED(CONFIG_SPL_BUILD) || (gd->flags & GD_FLG_RELOC)))
                return 0;
-- 
2.16.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to