Skip to content

Commit

Permalink
net: ethernet: mtk_eth_soc: delete some dead code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Dec 18, 2021
1 parent ddfbe18 commit ab9d0e2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ab9d0e2

Please sign in to comment.