diff options
author | Mark Brown <broonie@kernel.org> | 2017-11-03 22:53:56 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-03 22:53:56 +0300 |
commit | e8419c40a5ad58eaa112173f554148accc6794f3 (patch) | |
tree | 52ab846710cfd155ebbe6c401601a3a2ce5a3c63 /drivers/base/regmap | |
parent | 267f3e4f18f1ccf9e8cf72c3b4689df03025516d (diff) | |
download | linux-e8419c40a5ad58eaa112173f554148accc6794f3.tar.xz |
regmap: Clean up hwspinlock on regmap exit
We should free any hwspinlocks when we destroy the regmap, do so.
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 5ff549fa880b..bfe2f250d011 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1305,6 +1305,8 @@ void regmap_exit(struct regmap *map) kfree(async->work_buf); kfree(async); } + if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) + hwspin_lock_free(map->hwlock); kfree(map); } EXPORT_SYMBOL_GPL(regmap_exit); |