未验证 提交 e8419c40 编写于 作者: M Mark Brown

regmap: Clean up hwspinlock on regmap exit

We should free any hwspinlocks when we destroy the regmap, do so.
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 267f3e4f
...@@ -1305,6 +1305,8 @@ void regmap_exit(struct regmap *map) ...@@ -1305,6 +1305,8 @@ void regmap_exit(struct regmap *map)
kfree(async->work_buf); kfree(async->work_buf);
kfree(async); kfree(async);
} }
if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock)
hwspin_lock_free(map->hwlock);
kfree(map); kfree(map);
} }
EXPORT_SYMBOL_GPL(regmap_exit); EXPORT_SYMBOL_GPL(regmap_exit);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册