mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing
[ Upstream commit 7cb50f6c9fbaa1c0b80100b8971bf13db5d75d06 ] 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> 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d43f8e58f1
commit
6f72b4458e
1 changed files with 1 additions and 1 deletions
|
@ -1302,7 +1302,7 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
|
||||||
int index)
|
int index)
|
||||||
{
|
{
|
||||||
/* Return NULL for index > 0 to signify end of remote-endpoints. */
|
/* 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 NULL;
|
||||||
|
|
||||||
return of_graph_get_remote_port_parent(np);
|
return of_graph_get_remote_port_parent(np);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue