Commit 6a1b0b33 authored by Yisheng Xie's avatar Yisheng Xie Committed by Greg Kroah-Hartman

staging: android: ion: Remove check of debug_file

There's no need to check the return value of debug_file for it is just a
debugfs and we will go on the following process if we failed to create
debug_file. So just remove it.
Signed-off-by: default avatarYisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 59142f80
...@@ -522,7 +522,6 @@ DEFINE_SIMPLE_ATTRIBUTE(debug_shrink_fops, debug_shrink_get, ...@@ -522,7 +522,6 @@ DEFINE_SIMPLE_ATTRIBUTE(debug_shrink_fops, debug_shrink_get,
void ion_device_add_heap(struct ion_heap *heap) void ion_device_add_heap(struct ion_heap *heap)
{ {
struct dentry *debug_file;
struct ion_device *dev = internal_dev; struct ion_device *dev = internal_dev;
int ret; int ret;
...@@ -556,12 +555,8 @@ void ion_device_add_heap(struct ion_heap *heap) ...@@ -556,12 +555,8 @@ void ion_device_add_heap(struct ion_heap *heap)
char debug_name[64]; char debug_name[64];
snprintf(debug_name, 64, "%s_shrink", heap->name); snprintf(debug_name, 64, "%s_shrink", heap->name);
debug_file = debugfs_create_file(debug_name, debugfs_create_file(debug_name, 0644, dev->debug_root,
0644, dev->debug_root, heap, heap, &debug_shrink_fops);
&debug_shrink_fops);
if (!debug_file)
pr_err("Failed to create ion heap shrinker debugfs at %s\n",
debug_name);
} }
dev->heap_cnt++; dev->heap_cnt++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment