diff options
| author | Rob Herring <robh@kernel.org> | 2020-04-21 13:40:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-24 08:01:13 +0200 |
| commit | c6c4c74a0fe1bbe0141311f1bcec9e175897fd99 (patch) | |
| tree | 92e0f1dacd002235cfcf8736e0a30bafe6bd3951 | |
| parent | ef024894687611d7180fd8cbe6474583731f47d2 (diff) | |
| download | linux-c6c4c74a0fe1bbe0141311f1bcec9e175897fd99.tar.gz linux-c6c4c74a0fe1bbe0141311f1bcec9e175897fd99.tar.bz2 linux-c6c4c74a0fe1bbe0141311f1bcec9e175897fd99.zip | |
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.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 41b254be0295..c0281be8e061 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -169,9 +169,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; |
