[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171103200851.10215-2-broonie@kernel.org>
Date: Fri, 3 Nov 2017 20:08:51 +0000
From: Mark Brown <broonie@...nel.org>
To: Baolin Wang <baolin.wang@...aro.org>
Cc: linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: [PATCH 2/2] 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@...nel.org>
---
drivers/base/regmap/regmap.c | 2 ++
1 file changed, 2 insertions(+)
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);
--
2.15.0
Powered by blists - more mailing lists