software node: fix wrong node passed to find nargs_prop
authorClément Léger <clement.leger@bootlin.com>
Mon, 20 Dec 2021 21:05:33 +0000 (22:05 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Dec 2021 17:26:18 +0000 (18:26 +0100)
commitc5fc5ba8b6b7bebc05e45036a33405b4c5036c2f
tree6ce8b5771ab5fb38382f573ebd4a0cb70c0dd3c8
parentc49eea6ffec626c059ace085fce1bf501b05dbc7
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: b06184acf751 ("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>
drivers/base/swnode.c