summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2026-09-17 10:04:37 +0000
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-10-04 17:32:42 +0200
commit7ec8fd17f3a8059dcf94101065a35d0136031794 (patch)
treeedfc6313b25d18fabd98514170d0dfdea9616843 /rust/kernel/alloc
parentbefd4506174addc5e85641b4ef304c9247b48c55 (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 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions