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>
This commit is contained in:
@@ -105,8 +105,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev)
|
||||
|
||||
scnprintf(name, sizeof(name), "mic%d", cdev->index);
|
||||
cdev->dbg_dir = debugfs_create_dir(name, cosm_dbg);
|
||||
if (!cdev->dbg_dir)
|
||||
return;
|
||||
|
||||
debugfs_create_file("log_buf", 0444, cdev->dbg_dir, cdev,
|
||||
&log_buf_fops);
|
||||
@@ -125,8 +123,6 @@ void cosm_delete_debug_dir(struct cosm_device *cdev)
|
||||
void cosm_init_debugfs(void)
|
||||
{
|
||||
cosm_dbg = debugfs_create_dir(KBUILD_MODNAME, NULL);
|
||||
if (!cosm_dbg)
|
||||
pr_err("can't create debugfs dir\n");
|
||||
}
|
||||
|
||||
void cosm_exit_debugfs(void)
|
||||
|
Fai riferimento in un nuovo problema
Block a user