Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Greg Kroah-Hartman and committed by
Lee Jones
cbfe612d 64e8a9ba

+2 -12
+2 -11
drivers/mfd/aat2870-core.c
··· 321 321 static void aat2870_init_debugfs(struct aat2870_data *aat2870) 322 322 { 323 323 aat2870->dentry_root = debugfs_create_dir("aat2870", NULL); 324 - if (!aat2870->dentry_root) { 325 - dev_warn(aat2870->dev, 326 - "Failed to create debugfs root directory\n"); 327 - return; 328 - } 329 324 330 - aat2870->dentry_reg = debugfs_create_file("regs", 0644, 331 - aat2870->dentry_root, 332 - aat2870, &aat2870_reg_fops); 333 - if (!aat2870->dentry_reg) 334 - dev_warn(aat2870->dev, 335 - "Failed to create debugfs register file\n"); 325 + debugfs_create_file("regs", 0644, aat2870->dentry_root, aat2870, 326 + &aat2870_reg_fops); 336 327 } 337 328 338 329 #else
-1
include/linux/mfd/aat2870.h
··· 136 136 137 137 /* for debugfs */ 138 138 struct dentry *dentry_root; 139 - struct dentry *dentry_reg; 140 139 }; 141 140 142 141 struct aat2870_subdev_info {