media: platform: add missing put_device() call in mtk_jpeg_probe() and mtk_jpeg_remove()
authorYu Kuai <yukuai3@huawei.com>
Wed, 4 Nov 2020 12:41:36 +0000 (13:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:12 +0000 (11:53 +0100)
commit393957d3976238dbcd0f645f67184fae00124dc1
treeca5db25330836118d1e0b3b777fcbe967ef817aa
parenta3307503af9e520b88d5fdb3654ab3e484420e01
media: platform: add missing put_device() call in mtk_jpeg_probe() and mtk_jpeg_remove()

[ Upstream commit 0d72f489995bb8565f6fe30539d4504c88356a9e ]

if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() and mtk_jpeg_remove()
doesn't have a corresponding put_device(). Thus add a new helper
mtk_jpeg_clk_release() to fix it.

Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG 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-jpeg/mtk_jpeg_core.c