Commit 30ed997a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d5ddd5a5
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -193,9 +193,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir)
		return 0;

	d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir);
	if (d)
		(void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,
			(void *)pwrdm, &pwrdm_suspend_fops);
	debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, pwrdm,
			    &pwrdm_suspend_fops);

	return 0;
}
@@ -233,15 +232,13 @@ static int __init pm_dbg_init(void)
		return 0;

	d = debugfs_create_dir("pm_debug", NULL);
	if (!d)
		return -EINVAL;

	(void) debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
	(void) debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);
	debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
	debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);

	pwrdm_for_each(pwrdms_setup, (void *)d);

	(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
	debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
			    &enable_off_mode, &pm_dbg_option_fops);
	pm_dbg_init_done = 1;