summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2020-04-21 13:40:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-24 07:57:23 +0200
commit942d3a7dfb2124fe90cbb6a49799be876ab3fd8d (patch)
tree0aa86869d698355cd3211a937ca45d32ea3db820
parentbf22e616ec960c42bd695b99814a9c5ea9596607 (diff)
of: fix missing kobject init for !SYSFS && OF_DYNAMIC config
[ Upstream commit bd82bbf38cbe27f2c65660da801900d71bcc5cc8 ] The ref counting is broken for OF_DYNAMIC when sysfs is disabled because the kobject initialization is skipped. Only the properties add/remove/update should be skipped for !SYSFS config. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/of/base.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 27783223ca5c..8adffecd710b 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -167,9 +167,6 @@ int __of_attach_node_sysfs(struct device_node *np)
struct property *pp;
int rc;
- if (!IS_ENABLED(CONFIG_SYSFS))
- return 0;
-
if (!of_kset)
return 0;