[U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes

Urja Rannikko urjaman at gmail.com
Fri Mar 22 19:14:33 UTC 2019


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 <urjaman at gmail.com>
---
 drivers/pinctrl/pinctrl-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 0e3260afd1..bda951b07f 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -138,6 +138,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))
-- 
2.21.0



More information about the U-Boot mailing list