Patch "of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     of-property-fw_devlink-fix-stupid-bug-in-remote-endp.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b96037b42f4017c20a6c8fd7db8ff99c1b3ab56d
Author: Saravana Kannan <saravanak@xxxxxxxxxx>
Date:   Fri Feb 23 21:24:35 2024 -0800

    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@xxxxxxxxxxx>
    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@xxxxxxxxxx>
    Reviewed-by: Herve Codina <herve.codina@xxxxxxxxxxx>
    Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
    Tested-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240224052436.3552333-1-saravanak@xxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 885ee040ee2b3..15d1156843256 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1303,7 +1303,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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux