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

arm: omap2: 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: Kevin Hilman <khilman@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+6 -9
+6 -9
arch/arm/mach-omap2/pm-debug.c
··· 193 193 return 0; 194 194 195 195 d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir); 196 - if (d) 197 - (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, 198 - (void *)pwrdm, &pwrdm_suspend_fops); 196 + debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, pwrdm, 197 + &pwrdm_suspend_fops); 199 198 200 199 return 0; 201 200 } ··· 232 233 return 0; 233 234 234 235 d = debugfs_create_dir("pm_debug", NULL); 235 - if (!d) 236 - return -EINVAL; 237 236 238 - (void) debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops); 239 - (void) debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops); 237 + debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops); 238 + debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops); 240 239 241 240 pwrdm_for_each(pwrdms_setup, (void *)d); 242 241 243 - (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, 244 - &enable_off_mode, &pm_dbg_option_fops); 242 + debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, 243 + &enable_off_mode, &pm_dbg_option_fops); 245 244 pm_dbg_init_done = 1; 246 245 247 246 return 0;