summaryrefslogtreecommitdiff
path: root/drivers/misc/vmw_balloon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/vmw_balloon.c')
-rw-r--r--drivers/misc/vmw_balloon.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 043eed845246..97b58e7ad901 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -1699,19 +1699,10 @@ static int vmballoon_debug_show(struct seq_file *f, void *offset)
DEFINE_SHOW_ATTRIBUTE(vmballoon_debug);
-static int __init vmballoon_debugfs_init(struct vmballoon *b)
+static void __init vmballoon_debugfs_init(struct vmballoon *b)
{
- int error;
-
b->dbg_entry = debugfs_create_file("vmmemctl", S_IRUGO, NULL, b,
&vmballoon_debug_fops);
- if (IS_ERR(b->dbg_entry)) {
- error = PTR_ERR(b->dbg_entry);
- pr_err("failed to create debugfs entry, error: %d\n", error);
- return error;
- }
-
- return 0;
}
static void __exit vmballoon_debugfs_exit(struct vmballoon *b)
@@ -1724,9 +1715,8 @@ static void __exit vmballoon_debugfs_exit(struct vmballoon *b)
#else
-static inline int vmballoon_debugfs_init(struct vmballoon *b)
+static inline void vmballoon_debugfs_init(struct vmballoon *b)
{
- return 0;
}
static inline void vmballoon_debugfs_exit(struct vmballoon *b)
@@ -1948,10 +1938,6 @@ static int __init vmballoon_init(void)
if (error)
goto fail;
- error = vmballoon_debugfs_init(&balloon);
- if (error)
- goto fail;
-
/*
* Initialization of compaction must be done after the call to
* balloon_devinfo_init() .
@@ -1971,6 +1957,8 @@ static int __init vmballoon_init(void)
queue_delayed_work(system_freezable_wq, &balloon.dwork, 0);
+ vmballoon_debugfs_init(&balloon);
+
return 0;
fail:
vmballoon_unregister_shrinker(&balloon);