lkml.org 
[lkml]   [2023]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: mpt3sas: mpt3sas_debugfs: return value check of `mpt3sas_debugfs_root`
Date
Smatch complains that:
mpt3sas_init_debugfs() warn: 'mpt3sas_debugfs_root' is an error
pointer or valid

There is no need to check the return value of the debugfs_create_dir()
function, just delete the dead code.

Fixes: 2b01b293f359 ("scsi: mpt3sas: Capture IOC data for debugging purposes")
Signed-off-by: Jing Xu <U202112064@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
---
drivers/scsi/mpt3sas/mpt3sas_debugfs.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
index a6ab1db81167..c92e08c130b9 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
@@ -99,8 +99,6 @@ static const struct file_operations mpt3sas_debugfs_iocdump_fops = {
void mpt3sas_init_debugfs(void)
{
mpt3sas_debugfs_root = debugfs_create_dir("mpt3sas", NULL);
- if (!mpt3sas_debugfs_root)
- pr_info("mpt3sas: Cannot create debugfs root\n");
}

/*
--
2.25.1
\
 
 \ /
  Last update: 2023-04-23 14:28    [W:0.326 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site