]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
pktcdvd: remove unnecessary debugfs_create_dir() error check
authorYang Ruibin <11162571@vivo.com>
Tue, 27 Aug 2024 02:27:40 +0000 (10:27 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Aug 2024 15:18:08 +0000 (09:18 -0600)
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>
Link: https://lore.kernel.org/r/20240827022741.3410294-1-11162571@vivo.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c

index 7cece5884b9c671a64560de5f580f962129ebb1f..3edb37a41312f976c838e20f5686571b1fcc7d05 100644 (file)
@@ -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);