From: Rob Herring Date: Thu, 5 Oct 2017 17:01:46 +0000 (-0500) Subject: of: fix missing kobject init for !SYSFS && OF_DYNAMIC config X-Git-Tag: v4.15~421^2~33 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bd82bbf38cbe27f2c65660da801900d71bcc5cc8;p=mirror_ubuntu-bionic-kernel.git of: fix missing kobject init for !SYSFS && OF_DYNAMIC config 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 Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring --- diff --git a/drivers/of/base.c b/drivers/of/base.c index 260d33c0f26c..9e9bd17121fb 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;