Commit 27c39436 authored by Yu Kuai's avatar Yu Kuai Committed by Mauro Carvalho Chehab

media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()

mtk_vcodec_release_dec_pm() will be called in two places:

a. mtk_vcodec_init_dec_pm() succeed while mtk_vcodec_probe() return error.
b. mtk_vcodec_dec_remove().

In both cases put_device() call is needed, since of_find_device_by_node()
was called in mtk_vcodec_init_dec_pm() previously.

Thus add put_devices() call in mtk_vcodec_release_dec_pm()

Fixes: 590577a4 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5d4fa2c5
...@@ -85,6 +85,7 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev) ...@@ -85,6 +85,7 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev)
void mtk_vcodec_release_dec_pm(struct mtk_vcodec_dev *dev) void mtk_vcodec_release_dec_pm(struct mtk_vcodec_dev *dev)
{ {
pm_runtime_disable(dev->pm.dev); pm_runtime_disable(dev->pm.dev);
put_device(dev->pm.larbvdec);
} }
void mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm) void mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment