of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS
[linux-2.6-microblaze.git] / drivers / of / kobj.c
index a32e60b..6675b5e 100644 (file)
@@ -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;