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>
Fri, 26 Nov 2021 10:48:32 +0000 (11:48 +0100)
commite1f12efecb6733f2d1838cabadcc7825d8a397bc
treed2a72b104dcc3583c284d7b51c6da599de23fb9c
parent265b66ff74178587aa9cb79ab6d50a148cfcf92e
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