]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: exit pinconfig_post_bind if there are no subnodes
authorUrja Rannikko <urjaman@gmail.com>
Fri, 22 Mar 2019 19:14:33 +0000 (19:14 +0000)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 30 Apr 2019 22:00:05 +0000 (00:00 +0200)
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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/pinctrl/pinctrl-uclass.c

index 0e6c559d5efb21ed66325338ca86aadda70daed3..f01bc77a5761275013fef13e6d3e5476dc93aded 100644 (file)
@@ -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))