[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211217071037.GE26548@kili>
Date: Fri, 17 Dec 2021 10:10:37 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Felix Fietkau <nbd@....name>
Cc: John Crispin <john@...ozen.org>,
Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH net-next] 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@...cle.com>
---
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 3 ---
1 file changed, 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);
--
2.20.1
Powered by blists - more mailing lists