diff options
| author | 2026-09-17 10:04:37 +0000 | |
|---|---|---|
| committer | 2026-10-04 17:32:42 +0200 | |
| commit | 7ec8fd17f3a8059dcf94101065a35d0136031794 (patch) | |
| tree | edfc6313b25d18fabd98514170d0dfdea9616843 /scripts/Makefile.thinlto | |
| parent | media: mtk-jpeg: Fix runtime PM leak in mtk_jpegdec_worker() (diff) | |
media: mtk-jpeg: Fix runtime PM leak in mtk_jpegenc_worker()
pm_runtime_get_sync() leaves the device's runtime PM usage count
incremented even when it fails, and a failed clk_prepare_enable()
drops the reference as well. mtk_jpegenc_worker() jumps to enc_end
in both cases, which does not call pm_runtime_put(), so the
reference taken by the successful resume is leaked.
Use pm_runtime_resume_and_get() for the resume failure and release
the reference explicitly when the clock cannot be enabled, as
mtk_jpegdec_worker() already does.
Fixes: 5fb1c2361e56 ("mtk-jpegenc: add jpeg encode worker interface")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
