]> Git Repo - J-u-boot.git/commitdiff
usb: host: dwc3-sti-glue: Fix ofnode_valid() parameter
authorPatrice Chotard <[email protected]>
Mon, 29 Jun 2020 09:19:02 +0000 (11:19 +0200)
committerPatrice Chotard <[email protected]>
Thu, 13 Aug 2020 07:19:18 +0000 (09:19 +0200)
node varaible is used as iterator into ofnode_for_each_subnode()
loop, when exiting of it, node is no more a valid ofnode.
Use dwc3_node instead as parameter of ofnode_valid()

Fixes: ac28e59a574d ("usb: Migrate to support live DT for some driver")
Signed-off-by: Patrice Chotard <[email protected]>
Cc: Kever Yang <[email protected]>
drivers/usb/host/dwc3-sti-glue.c

index a72ab2016870628e9dabe6e82975374d2381a03f..3e6c1429d665b51a2db546559a1e11b052b67bf8 100644 (file)
@@ -159,7 +159,7 @@ static int sti_dwc3_glue_bind(struct udevice *dev)
                        dwc3_node = node;
        }
 
-       if (!ofnode_valid(node)) {
+       if (!ofnode_valid(dwc3_node)) {
                pr_err("Can't find dwc3 subnode for %s\n", dev->name);
                return -ENODEV;
        }
This page took 0.036746 seconds and 4 git commands to generate.