Merge tag 'devicetree-fixes-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Mar 2024 01:18:35 +0000 (17:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Mar 2024 01:18:35 +0000 (17:18 -0800)
Pull devicetree fix from Rob Herring:
 "One fix for a bug in fw_devlink handling of OF graph. This doesn't
  completely fix the reported problems, but it's with users adding out
  of tree code"

* tag 'devicetree-fixes-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing

drivers/of/property.c

index b71267c6667cf80309532c4ca2602354ccfc34a2..fa8cd33be1312dc57f075cf6557270794dcc2939 100644 (file)
@@ -1304,7 +1304,7 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
                                                 int index)
 {
        /* Return NULL for index > 0 to signify end of remote-endpoints. */
-       if (!index || strcmp(prop_name, "remote-endpoint"))
+       if (index > 0 || strcmp(prop_name, "remote-endpoint"))
                return NULL;
 
        return of_graph_get_remote_port_parent(np);