media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 19 Aug 2021 20:21:25 +0000 (22:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 13:04:05 +0000 (14:04 +0100)
commit4280b30ea9b5054f4afa15ae0bb282fafd543e75
treed689a9a347419e0d1a692526c69fd4633dccca0d
parente43b301cb1ba05616c35ece3622b66ef3badac8b
media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()'

[ Upstream commit 2143ad413c05c7be24c3a92760e367b7f6aaac92 ]

A successful 'clk_prepare()' call should be balanced by a corresponding
'clk_unprepare()' call in the error handling path of the probe, as already
done in the remove function.

Update the error handling path accordingly.

Fixes: 3003a180ef6b ("[media] VPU: mediatek: support Mediatek VPU")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Houlong Wei <houlong.wei@mediatek.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-vpu/mtk_vpu.c