[net-next,v3,01/15] net: devlink: add couple of missing mutex_destroy() calls
diff mbox series

Message ID 20190324101438.6376-2-jiri@resnulli.us
State Accepted
Delegated to: David Miller
Headers show
Series
  • devlink: small spring cleanup
Related show

Commit Message

Jiri Pirko March 24, 2019, 10:14 a.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

Add missing called to mutex_destroy() for two mutexes used
in devlink code.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 net/core/devlink.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/net/core/devlink.c b/net/core/devlink.c
index da0a29f30885..1fe772eb18af 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -4491,6 +4491,7 @@  devlink_health_reporter_destroy(struct devlink_health_reporter *reporter)
 {
 	mutex_lock(&reporter->devlink->lock);
 	list_del(&reporter->list);
+	mutex_destroy(&reporter->dump_lock);
 	mutex_unlock(&reporter->devlink->lock);
 	if (reporter->dump_fmsg)
 		devlink_fmsg_free(reporter->dump_fmsg);
@@ -5303,6 +5304,7 @@  EXPORT_SYMBOL_GPL(devlink_unregister);
  */
 void devlink_free(struct devlink *devlink)
 {
+	mutex_destroy(&devlink->lock);
 	WARN_ON(!list_empty(&devlink->reporter_list));
 	WARN_ON(!list_empty(&devlink->region_list));
 	WARN_ON(!list_empty(&devlink->param_list));