summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mediatek
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-12-17 10:10:37 +0300
committerJakub Kicinski <kuba@kernel.org>2021-12-18 06:24:38 +0300
commitab9d0e2171be56bb3bcd0fe4bd8ae5d2f24e5a80 (patch)
tree4a8db06e13cfb43279f4b12757188b2bd5cd35e9 /drivers/net/ethernet/mediatek
parentddfbe18da55cbea41aaf57d442228edbd6cbbff1 (diff)
downloadlinux-ab9d0e2171be56bb3bcd0fe4bd8ae5d2f24e5a80.tar.xz
net: ethernet: mtk_eth_soc: delete some dead code
The debugfs_create_dir() function never returns NULL. It does return error pointers but in normal situations like this there is no need to check for errors. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211217071037.GE26548@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
-rw-r--r--drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
index 98b1d3577bcd..d4b482340cb9 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
@@ -207,9 +207,6 @@ int mtk_ppe_debugfs_init(struct mtk_ppe *ppe)
struct dentry *root;
root = debugfs_create_dir("mtk_ppe", NULL);
- if (!root)
- return -ENOMEM;
-
debugfs_create_file("entries", S_IRUGO, root, ppe, &fops_all);
debugfs_create_file("bind", S_IRUGO, root, ppe, &fops_bind);