mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v7] pktcdvd: Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new()
@ 2024-08-27  2:27 Yang Ruibin
  2024-08-27 15:18 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Ruibin @ 2024-08-27  2:27 UTC (permalink / raw)
  To: linux-block, Jens Axboe, linux-kernel; +Cc: opensource.kernel, Yang Ruibin

Remove the debugfs_create_dir() error check. It's safe to pass in error
pointers to the debugfs API, hence the user isn't supposed to include
error checking of the return values.

Signed-off-by: Yang Ruibin <11162571@vivo.com>
---
Changes v7:
-Update commit messages
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v7] pktcdvd: Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new()
  2024-08-27  2:27 [PATCH v7] pktcdvd: Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new() Yang Ruibin
@ 2024-08-27 15:18 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-08-27 15:18 UTC (permalink / raw)
  To: linux-block, linux-kernel, Yang Ruibin; +Cc: opensource.kernel


On Tue, 27 Aug 2024 10:27:40 +0800, Yang Ruibin wrote:
> Remove the debugfs_create_dir() error check. It's safe to pass in error
> pointers to the debugfs API, hence the user isn't supposed to include
> error checking of the return values.
> 
> 

Applied, thanks!

[1/1] pktcdvd: Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new()
      commit: 752a59298ea9c695ec966fc5ba7173897a1ef361

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-27 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-27  2:27 [PATCH v7] pktcdvd: Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new() Yang Ruibin
2024-08-27 15:18 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®