Skip to contentSkip to conversation

net: ethernet: mtk_eth_soc: delete some dead code

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 17, 2021 – Dec 18, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c +0 -3
index 98b1d3577bcd..d4b482340cb9 100644
@@ -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);
 
Signature · 1 line
2.20.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 17 Dec 2021 10:10:37 +0300 you wrote:

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.

---
 drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 3 ---
 1 file changed, 3 deletions(-)

Here is the summary with links:
- [net-next] net: ethernet: mtk_eth_soc: delete some dead code

    https://git.kernel.org/netdev/net-next/c/ab9d0e2171be

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html