Skip to content

Commit

Permalink
software node: fix wrong node passed to find nargs_prop
Browse files Browse the repository at this point in the history
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: b06184a ("software node: Add software_node_get_reference_args()")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Clément Léger authored and Rafael J. Wysocki committed Dec 22, 2021
1 parent c49eea6 commit c5fc5ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/swnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c5fc5ba

Please sign in to comment.