]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
of: fix missing kobject init for !SYSFS && OF_DYNAMIC config
authorRob Herring <robh@kernel.org>
Thu, 5 Oct 2017 17:01:46 +0000 (12:01 -0500)
committerRob Herring <robh@kernel.org>
Mon, 16 Oct 2017 18:37:36 +0000 (13:37 -0500)
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>
drivers/of/base.c

index 260d33c0f26c9b290ec2c7f2d03237ebbad7da02..9e9bd17121fb8e40672ae114741519a0f0961077 100644 (file)
@@ -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;