Rafael J. Wysocki 64c7d7ea22 PM: runtime: clk: Fix clk_pm_runtime_get() error path
clk_pm_runtime_get() assumes that the PM-runtime usage counter will
be dropped by pm_runtime_get_sync() on errors, which is not the case,
so PM-runtime references to devices acquired by the former are leaked
on errors returned by the latter.

Fix this by modifying clk_pm_runtime_get() to drop the reference if
pm_runtime_get_sync() returns an error.

Fixes: 9a34b45397e5 clk: Add support for runtime PM
Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
2020-05-26 10:53:13 +02:00
..
2020-01-04 23:34:39 -08:00
2020-01-04 23:34:39 -08:00
2019-05-30 16:33:37 -07:00
2018-12-11 09:57:47 -08:00
2020-01-28 13:26:48 -08:00
2019-07-15 20:18:40 -07:00