diff options
author | Heikki Krogerus <[email protected]> | 2021-03-01 17:30:12 +0300 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2021-03-10 15:25:02 +0100 |
commit | 2a92c90f2ecca4475d6050f2f938a1755a8954cc (patch) | |
tree | 33e536927813e403369f2ffa9096276a19f1424c /lib/mpi/mpiutil.c | |
parent | 8891123f9cbb9c1ee531e5a87fa116f0af685c48 (diff) |
software node: Fix device_add_software_node()
The function device_add_software_node() was meant to
register the node supplied to it, but only if that node
wasn't already registered. Right now the function attempts
to always register the node. That will cause a failure with
nodes that are already registered.
Fixing that by incrementing the reference count of the nodes
that have already been registered, and only registering the
new nodes. Also, clarifying the behaviour in the function
documentation.
Fixes: e68d0119e328 ("software node: Introduce device_add_software_node()")
Signed-off-by: Heikki Krogerus <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions