summaryrefslogtreecommitdiffstats
path: root/fs/debugfs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-16 15:46:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-03 16:34:27 +0200
commitc9c2c27d7ceca8c2856c5008f2002bddb384f518 (patch)
treecafa65120e2e5d80ef78d1bcf475bd2359b56de3 /fs/debugfs
parent36b7ee4dce9e519cf87917eccbaabb53638fdf03 (diff)
downloadlinux-stable-c9c2c27d7ceca8c2856c5008f2002bddb384f518.tar.gz
linux-stable-c9c2c27d7ceca8c2856c5008f2002bddb384f518.tar.bz2
linux-stable-c9c2c27d7ceca8c2856c5008f2002bddb384f518.zip
debugfs: make debugfs_create_u32_array() return void
The single user of debugfs_create_u32_array() does not care about the return value of it, so make it return void as there is no need to do anything with the return value. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/debugfs')
-rw-r--r--fs/debugfs/file.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index ddd708b09fa1..93e4ca6b2ad7 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -997,25 +997,19 @@ static const struct file_operations u32_array_fops = {
* @array as data. If the @mode variable is so set it can be read from.
* Writing is not supported. Seek within the file is also not supported.
* Once array is created its size can not be changed.
- *
- * The function returns a pointer to dentry on success. If an error occurs,
- * %ERR_PTR(-ERROR) or NULL will be returned. If debugfs is not enabled in
- * the kernel, the value %ERR_PTR(-ENODEV) will be returned.
*/
-struct dentry *debugfs_create_u32_array(const char *name, umode_t mode,
- struct dentry *parent,
- u32 *array, u32 elements)
+void debugfs_create_u32_array(const char *name, umode_t mode,
+ struct dentry *parent, u32 *array, u32 elements)
{
struct array_data *data = kmalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL)
- return NULL;
+ return;
data->array = array;
data->elements = elements;
- return debugfs_create_file_unsafe(name, mode, parent, data,
- &u32_array_fops);
+ debugfs_create_file_unsafe(name, mode, parent, data, &u32_array_fops);
}
EXPORT_SYMBOL_GPL(debugfs_create_u32_array);