aboutsummaryrefslogtreecommitdiff
path: root/kernel/ksysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r--kernel/ksysfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index a9e6354d9e25..f45ade718054 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -8,6 +8,7 @@
#include <asm/byteorder.h>
#include <linux/kobject.h>
+#include <linux/ksysfs.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/export.h>
@@ -213,7 +214,7 @@ static const struct attribute_group kernel_attr_group = {
.attrs = kernel_attrs,
};
-static int __init ksysfs_init(void)
+void __init ksysfs_init(void)
{
int error;
@@ -234,14 +235,12 @@ static int __init ksysfs_init(void)
goto group_exit;
}
- return 0;
+ return;
group_exit:
sysfs_remove_group(kernel_kobj, &kernel_attr_group);
kset_exit:
kobject_put(kernel_kobj);
exit:
- return error;
+ pr_err("failed to initialize the kernel kobject: %d\n", error);
}
-
-core_initcall(ksysfs_init);