summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/devlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/netdevsim/devlink.c')
-rw-r--r--drivers/net/netdevsim/devlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/devlink.c b/drivers/net/netdevsim/devlink.c
index ba663e5af168..5135fc371f01 100644
--- a/drivers/net/netdevsim/devlink.c
+++ b/drivers/net/netdevsim/devlink.c
@@ -207,6 +207,7 @@ void nsim_devlink_teardown(struct netdevsim *ns)
struct net *net = nsim_to_net(ns);
bool *reg_devlink = net_generic(net, nsim_devlink_id);
+ devlink_resources_unregister(ns->devlink, NULL);
devlink_unregister(ns->devlink);
devlink_free(ns->devlink);
ns->devlink = NULL;