Commit 375cf8c6 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: devlink: add couple of missing mutex_destroy() calls

Add missing called to mutex_destroy() for two mutexes used
in devlink code.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 956ca8fc
...@@ -4486,6 +4486,7 @@ devlink_health_reporter_destroy(struct devlink_health_reporter *reporter) ...@@ -4486,6 +4486,7 @@ devlink_health_reporter_destroy(struct devlink_health_reporter *reporter)
{ {
mutex_lock(&reporter->devlink->lock); mutex_lock(&reporter->devlink->lock);
list_del(&reporter->list); list_del(&reporter->list);
mutex_destroy(&reporter->dump_lock);
mutex_unlock(&reporter->devlink->lock); mutex_unlock(&reporter->devlink->lock);
if (reporter->dump_fmsg) if (reporter->dump_fmsg)
devlink_fmsg_free(reporter->dump_fmsg); devlink_fmsg_free(reporter->dump_fmsg);
...@@ -5261,6 +5262,7 @@ EXPORT_SYMBOL_GPL(devlink_unregister); ...@@ -5261,6 +5262,7 @@ EXPORT_SYMBOL_GPL(devlink_unregister);
*/ */
void devlink_free(struct devlink *devlink) void devlink_free(struct devlink *devlink)
{ {
mutex_destroy(&devlink->lock);
WARN_ON(!list_empty(&devlink->reporter_list)); WARN_ON(!list_empty(&devlink->reporter_list));
WARN_ON(!list_empty(&devlink->region_list)); WARN_ON(!list_empty(&devlink->region_list));
WARN_ON(!list_empty(&devlink->param_list)); WARN_ON(!list_empty(&devlink->param_list));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment