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 18:16:28 +0000 (19:16 +0100)
commit56bc844703f075a5bd17cac76fce659bcc53b9a9
tree93d1fe6454f8dc47b8e6c1ae1717fa2df704eae0
parent4a2ab1ce79ba47361335bb3ac546162849e75ca9
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