linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] software node: fix wrong node passed to find nargs_prop
@ 2021-12-20 21:05 Clément Léger
       [not found] ` <CAHp75Vf+F2L4EFmokRYD+-M9hSuz+SbiiWnqHvFZttRyfKS-mg@mail.gmail.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Clément Léger @ 2021-12-20 21:05 UTC (permalink / raw)
  To: Andy Shevchenko, Heikki Krogerus, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Clément Léger, linux-acpi, linux-kernel

nargs_prop refers to a property located in the reference that is found
within the nargs property. Use the correct reference node in call to
property_entry_read_int_array() to retrieve the correct nargs value.

Fixes: b06184acf751 ("software node: Add software_node_get_reference_args()")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
 drivers/base/swnode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 4debcea4fb12..0a482212c7e8 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -529,7 +529,7 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
 		return -ENOENT;
 
 	if (nargs_prop) {
-		error = property_entry_read_int_array(swnode->node->properties,
+		error = property_entry_read_int_array(ref->node->properties,
 						      nargs_prop, sizeof(u32),
 						      &nargs_prop_val, 1);
 		if (error)
-- 
2.34.1


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

end of thread, other threads:[~2021-12-22 17:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 21:05 [PATCH] software node: fix wrong node passed to find nargs_prop Clément Léger
     [not found] ` <CAHp75Vf+F2L4EFmokRYD+-M9hSuz+SbiiWnqHvFZttRyfKS-mg@mail.gmail.com>
2021-12-20 23:37   ` Daniel Scally
2021-12-21  9:34     ` Greg Kroah-Hartman
2021-12-21  9:45       ` Sakari Ailus
2021-12-21 22:09         ` Daniel Scally
2021-12-22  9:34           ` Sakari Ailus
2021-12-21  9:46     ` Clément Léger
2021-12-21 22:08       ` Daniel Scally
2021-12-21 11:52 ` Sakari Ailus
2021-12-22 11:19 ` Heikki Krogerus
2021-12-22 17:27   ` Rafael J. Wysocki

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).