media: platform: add missing put_device() call in mtk_jpeg_clk_init()
authorYu Kuai <yukuai3@huawei.com>
Fri, 9 Oct 2020 12:37:58 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:11 +0000 (11:53 +0100)
commitc7ffc289daa3fb264e271b3a5b4f533a61f91e9c
tree74d806fcebbb65142b58db0b336fb3ae127c4657
parent22ec70191039a9a5c22c07d0f53a79b3aca0a9e7
media: platform: add missing put_device() call in mtk_jpeg_clk_init()

[ Upstream commit f28a81a3b64270da3588174feff4628c36e0ff4e ]

if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have
a corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.

Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock")
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-jpeg/mtk_jpeg_core.c