aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds2021-09-24 11:20:29 -0700
committerLinus Torvalds2021-09-24 11:20:29 -0700
commit47d7e65d64cc72756b1aa0ccfa3dcbd38c638507 (patch)
treefe6bfd49f7138862035f5eb8e6d66b5e8144de8c /drivers
parentea1f9163ac83fa537f58e00a81028844702279e4 (diff)
parent5aeb05b27f81269a2bf2e15eab9fc0f9a400d3a8 (diff)
Merge tag 'devprop-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework fix from Rafael Wysocki: "Fix software node refcount imbalance on device removal (Laurentiu Tudor)" * tag 'devprop-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: software node: balance refcount for managed software nodes
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/swnode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 7bd0f3cfb7eb..c46f6a8e14d2 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -1116,6 +1116,9 @@ int device_create_managed_software_node(struct device *dev,
to_swnode(fwnode)->managed = true;
set_secondary_fwnode(dev, fwnode);
+ if (device_is_registered(dev))
+ software_node_notify(dev);
+
return 0;
}
EXPORT_SYMBOL_GPL(device_create_managed_software_node);