Skip to content

Commit 7cb50f6

Browse files
Saravana Kannanrobherring
authored andcommitted
of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing
Introduced a stupid bug in commit 782bfd0 ("of: property: Improve finding the supplier of a remote-endpoint property") due to a last minute incorrect edit of "index !=0" into "!index". This patch fixes it to be "index > 0" to match the comment right next to it. Reported-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/ Fixes: 782bfd0 ("of: property: Improve finding the supplier of a remote-endpoint property") Signed-off-by: Saravana Kannan <saravanak@google.com> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/r/20240224052436.3552333-1-saravanak@google.com Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 4e06ec0 commit 7cb50f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/property.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
13041304
int index)
13051305
{
13061306
/* Return NULL for index > 0 to signify end of remote-endpoints. */
1307-
if (!index || strcmp(prop_name, "remote-endpoint"))
1307+
if (index > 0 || strcmp(prop_name, "remote-endpoint"))
13081308
return NULL;
13091309

13101310
return of_graph_get_remote_port_parent(np);

0 commit comments

Comments
 (0)