summaryrefslogtreecommitdiff
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorSun Ke <sunke32@huawei.com>2022-09-02 10:58:19 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-09-24 08:53:43 +0200
commitff464745e4576ed8670bc2fc8da27e022f0ea56c (patch)
treec0646153a2f5da9156ee5684476560a604f16c36 /drivers/media/tuners
parentdec7920e55db35ac429b002025aa1fafc0ec7d57 (diff)
media: platform: mtk-mdp3: fix PM reference leak in mdp_comp_clock_on()
mdp_comp_clock_on will increase runtime PM usage counter, and mdp_comp_clock_off will decrease the runtime PM usage counter. so, if mdp_comp_clock_on failed after increment runtime PM usage counter, it should decrease it before return a error code. pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. And if failed to enable clk, add pm_runtime_put() to decrease the runtime PM usage counter. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Sun Ke <sunke32@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/tuners')
0 files changed, 0 insertions, 0 deletions