From: Peng Fan Date: Wed, 31 Jul 2019 07:01:49 +0000 (+0000) Subject: dm: clk: ignore default settings when node not valid X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=91944ef09d603f6aa41649b2a1fdd64fea9651f9;p=u-boot.git dm: clk: ignore default settings when node not valid When the device not binded with a node, we need ignore the parents and rate settings. Cc: Simon Glass Cc: Jagan Teki Cc: Philipp Tomsich Cc: Neil Armstrong Cc: Andreas Dannenberg Signed-off-by: Peng Fan --- diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 85dfe712f5..cee4d912b0 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -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;