]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()
authorYu Kuai <yukuai3@huawei.com>
Fri, 9 Oct 2020 12:38:02 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:53 +0000 (11:25 +0100)
commite92c43000273edd7bb49e66712d557f6dd5cba2a
tree10ca8104e6a0321e2a59acfd6eeedd9d6ddc6786
parent390b4d5a38e46fc3abbaf6ca66ef3f2db9de7284
media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()

[ Upstream commit 27c3943683f74e35e1d390ceb2e3639eff616ad6 ]

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: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c