[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240224052436.3552333-1-saravanak@google.com>
Date: Fri, 23 Feb 2024 21:24:35 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Rob Herring <robh+dt@...nel.org>, Frank Rowand <frowand.list@...il.com>,
Saravana Kannan <saravanak@...gle.com>
Cc: "Hervé Codina" <herve.codina@...tlin.com>, Luca Ceresoli <luca.ceresoli@...tlin.com>,
kernel-team@...roid.com, Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <luca.ceresoli@...tlin.com>
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 <saravanak@...gle.com>
---
Using Link: instead of Closes: because Luca reported two separate issues.
Sorry about introducing a stupid bug in an -rcX Rob.
-Saravana
drivers/of/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.44.0.rc0.258.g7320e95886-goog
Powered by blists - more mailing lists