]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Wed, 17 Nov 2021 10:04:02 +0000 (11:04 +0100)
commit0dd8fc82fa0454d30cc2b1fe3ce9a17c78880c77
tree016bd244778380d9a2a3791ae530d6f78023747a
parente3a8abdb8f342db08b278b8c3500e666a3de0398
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