[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240823112246.3905118-1-11162571@vivo.com>
Date: Fri, 23 Aug 2024 19:22:45 +0800
From: Yang Ruibin <11162571@...o.com>
To: linux-block@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com,
Yang Ruibin <11162571@...o.com>
Subject: [PATCH v4] drivers:block:Cancel debugfs_create_dir() check
No need to check debugfs_create_dir() return value.
It's safe to pass in errors that debugfs_create_dir() gives you.
Fixes: f40eb99897af ("pktcdvd: remove driver.")
Signed-off-by: Yang Ruibin <11162571@...o.com>
---
Changes V4:
- Remove the check for the return value of debugfs_create_dir()
---
drivers/block/pktcdvd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 7cece5884b9c..3edb37a41312 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -498,8 +498,6 @@ static void pkt_debugfs_dev_new(struct pktcdvd_device *pd)
if (!pkt_debugfs_root)
return;
pd->dfs_d_root = debugfs_create_dir(pd->disk->disk_name, pkt_debugfs_root);
- if (!pd->dfs_d_root)
- return;
pd->dfs_f_info = debugfs_create_file("info", 0444, pd->dfs_d_root,
pd, &pkt_seq_fops);
--
2.34.1
Powered by blists - more mailing lists