diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-06 18:47:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-01 08:06:59 +0200 |
commit | dc607f6bbafd2d8bf1d518c346560ba9577e402f (patch) | |
tree | 57e2da75f148dc697c5c04aebf3f45c70dd675ea /drivers/mfd/aat2870-core.c | |
parent | b11f75d032d8706bd39390a63107828985a61de3 (diff) | |
download | linux-stable-dc607f6bbafd2d8bf1d518c346560ba9577e402f.tar.gz linux-stable-dc607f6bbafd2d8bf1d518c346560ba9577e402f.tar.bz2 linux-stable-dc607f6bbafd2d8bf1d518c346560ba9577e402f.zip |
mfd: aat2870: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20190706164722.18766-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd/aat2870-core.c')
-rw-r--r-- | drivers/mfd/aat2870-core.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 9f58cb2d3789..78ee4b28fca2 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c @@ -321,18 +321,9 @@ static const struct file_operations aat2870_reg_fops = { static void aat2870_init_debugfs(struct aat2870_data *aat2870) { aat2870->dentry_root = debugfs_create_dir("aat2870", NULL); - if (!aat2870->dentry_root) { - dev_warn(aat2870->dev, - "Failed to create debugfs root directory\n"); - return; - } - aat2870->dentry_reg = debugfs_create_file("regs", 0644, - aat2870->dentry_root, - aat2870, &aat2870_reg_fops); - if (!aat2870->dentry_reg) - dev_warn(aat2870->dev, - "Failed to create debugfs register file\n"); + debugfs_create_file("regs", 0644, aat2870->dentry_root, aat2870, + &aat2870_reg_fops); } #else |