mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
956ca8fc5c
commit
375cf8c643
1 changed files with 2 additions and 0 deletions
|
@ -4486,6 +4486,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);
|
||||
|
@ -5261,6 +5262,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));
|
||||
|
|
Loading…
Reference in a new issue