aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_debugfs.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2020-02-28 18:01:20 +0000
committerDavid S. Miller <davem@davemloft.net>2020-02-29 21:37:03 -0800
commitf3f2f98470b7b8ead7c364c103303c3cac8c2ff0 (patch)
treebb4e78e69bdd735c97887ae5dd74f605ccc007dd /net/hsr/hsr_debugfs.c
parentnet: ag71xx: port to phylink (diff)
downloadlinux-dev-f3f2f98470b7b8ead7c364c103303c3cac8c2ff0.tar.xz
linux-dev-f3f2f98470b7b8ead7c364c103303c3cac8c2ff0.zip
hsr: use debugfs_remove_recursive() instead of debugfs_remove()
If it uses debugfs_remove_recursive() instead of debugfs_remove(), hsr_priv() doesn't need to have "node_tbl_file" pointer variable. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_debugfs.c')
-rw-r--r--net/hsr/hsr_debugfs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/hsr/hsr_debugfs.c b/net/hsr/hsr_debugfs.c
index d5f709b940ff..9787ef11ca71 100644
--- a/net/hsr/hsr_debugfs.c
+++ b/net/hsr/hsr_debugfs.c
@@ -113,7 +113,6 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
priv->node_tbl_root = NULL;
return;
}
- priv->node_tbl_file = de;
}
/* hsr_debugfs_term - Tear down debugfs intrastructure
@@ -125,9 +124,7 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
void
hsr_debugfs_term(struct hsr_priv *priv)
{
- debugfs_remove(priv->node_tbl_file);
- priv->node_tbl_file = NULL;
- debugfs_remove(priv->node_tbl_root);
+ debugfs_remove_recursive(priv->node_tbl_root);
priv->node_tbl_root = NULL;
}