mirror of https://gitee.com/openkylin/linux.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 <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>
This commit is contained in:
parent
de18e4bea0
commit
bd82bbf38c
|
@ -169,9 +169,6 @@ int __of_attach_node_sysfs(struct device_node *np)
|
||||||
struct property *pp;
|
struct property *pp;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_SYSFS))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!of_kset)
|
if (!of_kset)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue