summaryrefslogtreecommitdiff
path: root/drivers/of/kobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/kobj.c')
-rw-r--r--drivers/of/kobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c
index a32e60b024b8..6675b5e56960 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -119,7 +119,7 @@ int __of_attach_node_sysfs(struct device_node *np)
struct property *pp;
int rc;
- if (!of_kset)
+ if (!IS_ENABLED(CONFIG_SYSFS) || !of_kset)
return 0;
np->kobj.kset = of_kset;