summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-06-04 12:03:03 +0100
committerMark Brown <broonie@kernel.org>2018-06-04 12:03:03 +0100
commit869619e627287606d4d36a72a6e2127230f95507 (patch)
tree0af42994356fa409acb6aac761d8e5297e961fa2
parentcbdd39ca498f6b2b221614d9c1d105f2948f1dbb (diff)
parenteb4a219d19fde99616f120f5655a7121c918cd49 (diff)
downloadlinux-869619e627287606d4d36a72a6e2127230f95507.tar.bz2
Merge branch 'regmap-4.17' into regmap-4.18 for the merge window
-rw-r--r--drivers/base/regmap/regmap-mmio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index 5cadfd3394d8..8741fb5f8f54 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -206,7 +206,8 @@ static void regmap_mmio_free_context(void *context)
if (!IS_ERR(ctx->clk)) {
clk_unprepare(ctx->clk);
- clk_put(ctx->clk);
+ if (!ctx->attached_clk)
+ clk_put(ctx->clk);
}
kfree(context);
}