aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaravana Kannan <[email protected]>2024-02-23 21:24:35 -0800
committerRob Herring <[email protected]>2024-03-01 15:28:17 -0600
commit7cb50f6c9fbaa1c0b80100b8971bf13db5d75d06 (patch)
tree5d2e2e8ea1e868fd5bc73a1d6465687860482614
parent4e06ec0774f5bebf10e27bc7a5ace4b48ae0fa56 (diff)
of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing
Introduced a stupid bug in commit 782bfd03c3ae ("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 <[email protected]> Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/ Fixes: 782bfd03c3ae ("of: property: Improve finding the supplier of a remote-endpoint property") Signed-off-by: Saravana Kannan <[email protected]> Reviewed-by: Herve Codina <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]> Tested-by: Luca Ceresoli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
-rw-r--r--drivers/of/property.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c
index b71267c6667c..fa8cd33be131 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -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);