summaryrefslogtreecommitdiff
path: root/drivers/misc/mic/card
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-11 21:43:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-18 14:47:24 +0300
commit7e9f02a7896bf12bddfa28c4fdc442aa6cc6eda1 (patch)
tree172b2c96d9583809e794140133ecedc035ddf81e /drivers/misc/mic/card
parent053cf51040ed0ebc56c1b58453ad502dc4d0927b (diff)
downloadlinux-7e9f02a7896bf12bddfa28c4fdc442aa6cc6eda1.tar.xz
mic: 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: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: linux-kernel@vger.kernel.org Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic/card')
-rw-r--r--drivers/misc/mic/card/mic_debugfs.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/misc/mic/card/mic_debugfs.c b/drivers/misc/mic/card/mic_debugfs.c
index 7a4140874888..fa2b5fefb791 100644
--- a/drivers/misc/mic/card/mic_debugfs.c
+++ b/drivers/misc/mic/card/mic_debugfs.c
@@ -63,25 +63,13 @@ DEFINE_SHOW_ATTRIBUTE(mic_intr);
*/
void __init mic_create_card_debug_dir(struct mic_driver *mdrv)
{
- struct dentry *d;
-
if (!mic_dbg)
return;
mdrv->dbg_dir = debugfs_create_dir(mdrv->name, mic_dbg);
- if (!mdrv->dbg_dir) {
- dev_err(mdrv->dev, "Cant create dbg_dir %s\n", mdrv->name);
- return;
- }
-
- d = debugfs_create_file("intr_test", 0444, mdrv->dbg_dir,
- mdrv, &mic_intr_fops);
- if (!d) {
- dev_err(mdrv->dev,
- "Cant create dbg intr_test %s\n", mdrv->name);
- return;
- }
+ debugfs_create_file("intr_test", 0444, mdrv->dbg_dir, mdrv,
+ &mic_intr_fops);
}
/**
@@ -101,8 +89,6 @@ void mic_delete_card_debug_dir(struct mic_driver *mdrv)
void __init mic_init_card_debugfs(void)
{
mic_dbg = debugfs_create_dir(KBUILD_MODNAME, NULL);
- if (!mic_dbg)
- pr_err("can't create debugfs dir\n");
}
/**