diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-05-21 19:08:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-17 16:40:30 +0200 |
commit | 6ed11984edb198159261af63706365fdda67463c (patch) | |
tree | 2c8c1401aeec7737f5f525f2389b30e10e6db2e0 /mm | |
parent | fc45cd292c5ed8cd1a502554467b89164a71e007 (diff) |
PM: runtime: clk: Fix clk_pm_runtime_get() error path
commit 64c7d7ea22d86cacb65d0c097cc447bc0e6d8abd upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions