This is a note to let you know that I've just added the patch titled software node: Fix node registration to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: software-node-fix-node-registration.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 8891123f9cbb9c1ee531e5a87fa116f0af685c48 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> Date: Mon, 1 Mar 2021 17:30:11 +0300 Subject: software node: Fix node registration From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> commit 8891123f9cbb9c1ee531e5a87fa116f0af685c48 upstream. Software node can not be registered before its parent. Fixes: 80488a6b1d3c ("software node: Add support for static node descriptors") Cc: 5.10+ <stable@xxxxxxxxxxxxxxx> # 5.10+ Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Tested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/base/swnode.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -812,6 +812,9 @@ int software_node_register(const struct if (software_node_to_swnode(node)) return -EEXIST; + if (node->parent && !parent) + return -EINVAL; + return PTR_ERR_OR_ZERO(swnode_register(node, parent, 0)); } EXPORT_SYMBOL_GPL(software_node_register); Patches currently in stable-queue which might be from heikki.krogerus@xxxxxxxxxxxxxxx are queue-5.4/software-node-fix-node-registration.patch