Skip to content

Commit c5fc5ba

Browse files
clementlegerrafaeljw
authored andcommitted
software node: fix wrong node passed to find nargs_prop
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 <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Reviewed-by: Daniel Scally <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c49eea6 commit c5fc5ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/swnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
529529
return -ENOENT;
530530

531531
if (nargs_prop) {
532-
error = property_entry_read_int_array(swnode->node->properties,
532+
error = property_entry_read_int_array(ref->node->properties,
533533
nargs_prop, sizeof(u32),
534534
&nargs_prop_val, 1);
535535
if (error)

0 commit comments

Comments
 (0)