]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: clk: ignore default settings when node not valid
authorPeng Fan <peng.fan@nxp.com>
Wed, 31 Jul 2019 07:01:49 +0000 (07:01 +0000)
committerLukasz Majewski <lukma@denx.de>
Wed, 31 Jul 2019 07:20:51 +0000 (09:20 +0200)
When the device not binded with a node, we need ignore
the parents and rate settings.

Cc: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/clk/clk-uclass.c

index 85dfe712f5acf76dbf4f2bc2b7a3d496dccff66f..cee4d912b0e80cd35ae9760673a6b3871b92d766 100644 (file)
@@ -285,6 +285,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;