From: Urja Rannikko Date: Fri, 22 Mar 2019 19:14:33 +0000 (+0000) Subject: pinctrl: exit pinconfig_post_bind if there are no subnodes X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=63402831e0b68ded49c054989fffdfd88b98953b;p=u-boot.git pinctrl: exit pinconfig_post_bind if there are no subnodes This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed. Signed-off-by: Urja Rannikko Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich --- diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 0e6c559d5e..f01bc77a57 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -116,6 +116,9 @@ static int pinconfig_post_bind(struct udevice *dev) ofnode node; int ret; + if (!dev_of_valid(dev)) + return 0; + dev_for_each_subnode(node, dev) { if (pre_reloc_only && !ofnode_pre_reloc(node))