linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing
@ 2024-02-24  5:24 Saravana Kannan
  2024-02-24  5:28 ` Saravana Kannan
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Saravana Kannan @ 2024-02-24  5:24 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Saravana Kannan
  Cc: Hervé Codina, Luca Ceresoli, kernel-team, Rob Herring,
	devicetree, linux-kernel

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@bootlin.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@google.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


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-03-26  2:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-24  5:24 [PATCH] of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing Saravana Kannan
2024-02-24  5:28 ` Saravana Kannan
2024-02-26 12:04   ` Luca Ceresoli
2024-02-29  0:20   ` Rob Herring
2024-02-26  8:19 ` Luca Ceresoli
2024-02-26  8:56 ` Herve Codina
2024-02-29 10:11 ` Geert Uytterhoeven
2024-02-29 22:45   ` Saravana Kannan
2024-02-29 22:47     ` Saravana Kannan
2024-03-14  1:48   ` Saravana Kannan
2024-03-14  8:46     ` Geert Uytterhoeven
2024-03-15  5:50       ` Saravana Kannan
2024-03-01 21:28 ` Rob Herring
2024-03-21  6:04 ` John Watts
2024-03-23  1:53   ` Saravana Kannan
2024-03-23 12:19     ` John Watts
2024-03-25 22:49       ` Saravana Kannan
2024-03-26  0:42         ` John Watts
2024-03-26  1:35           ` Saravana Kannan
2024-03-26  1:42             ` John Watts
2024-03-26  2:31             ` John Watts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).