aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/platform/intel/iosf_mbi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2019-01-22 14:35:41 +0000
committerGreg Kroah-Hartman <[email protected]>2019-06-03 14:18:12 +0000
commit519e96ee114ff70e420111b39d884153250626dd (patch)
tree0fce2daafc2917e12aa1f116f69516ccd390adb4 /arch/x86/platform/intel/iosf_mbi.c
parentx86: mm: no need to check return value of debugfs_create functions (diff)
downloadkernel-519e96ee114ff70e420111b39d884153250626dd.tar.gz
kernel-519e96ee114ff70e420111b39d884153250626dd.zip
x86: platform: 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: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'arch/x86/platform/intel/iosf_mbi.c')
-rw-r--r--arch/x86/platform/intel/iosf_mbi.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/x86/platform/intel/iosf_mbi.c b/arch/x86/platform/intel/iosf_mbi.c
index a9f2e888e135..b18d4dec4658 100644
--- a/arch/x86/platform/intel/iosf_mbi.c
+++ b/arch/x86/platform/intel/iosf_mbi.c
@@ -470,31 +470,16 @@ static struct dentry *iosf_dbg;
static void iosf_sideband_debug_init(void)
{
- struct dentry *d;
-
iosf_dbg = debugfs_create_dir("iosf_sb", NULL);
- if (IS_ERR_OR_NULL(iosf_dbg))
- return;
/* mdr */
- d = debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr);
- if (!d)
- goto cleanup;
+ debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr);
/* mcrx */
- d = debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx);
- if (!d)
- goto cleanup;
+ debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx);
/* mcr - initiates mailbox tranaction */
- d = debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops);
- if (!d)
- goto cleanup;
-
- return;
-
-cleanup:
- debugfs_remove_recursive(d);
+ debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops);
}
static void iosf_debugfs_init(void)