]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bna: Remove error checking for debugfs create APIs
authorZhen Lei <thunder.leizhen@huawei.com>
Mon, 28 Oct 2024 02:09:42 +0000 (10:09 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 01:51:52 +0000 (18:51 -0700)
Driver bna can work fine even if any previous call to debugfs create
APIs failed. All return value checks of them should be dropped, as
debugfs APIs say.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241028020943.507-2-thunder.leizhen@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/brocade/bna/bnad_debugfs.c

index 97291bfbeea589e8ca8ab637db8bcff7e573322f..1a3a8bd133706ad49700e80fabaaf9f759b23d63 100644 (file)
@@ -500,11 +500,6 @@ bnad_debugfs_init(struct bnad *bnad)
        if (!bna_debugfs_root) {
                bna_debugfs_root = debugfs_create_dir("bna", NULL);
                atomic_set(&bna_debugfs_port_count, 0);
-               if (!bna_debugfs_root) {
-                       netdev_warn(bnad->netdev,
-                                   "debugfs root dir creation failed\n");
-                       return;
-               }
        }
 
        /* Setup the pci_dev debugfs directory for the port */
@@ -523,12 +518,6 @@ bnad_debugfs_init(struct bnad *bnad)
                                                        bnad->port_debugfs_root,
                                                        bnad,
                                                        file->fops);
-                       if (!bnad->bnad_dentry_files[i]) {
-                               netdev_warn(bnad->netdev,
-                                           "create %s entry failed\n",
-                                           file->name);
-                               return;
-                       }
                }
        }
 }