media: tvp5150: Add missed media_entity_cleanup()
authorChuhong Yuan <hslester96@gmail.com>
Sat, 6 Jun 2020 14:39:18 +0000 (16:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:51 +0000 (08:23 +0200)
commite66c2c6bcc88922cb2d1edcb96ce73fc1f75d6b3
treec22702a6f7ee5da90f4af4c3e50da9399f6465f6
parente6a4c993ec1a941918761dc6ee322a0944d706f6
media: tvp5150: Add missed media_entity_cleanup()

[ Upstream commit d000e9b5e4a23dd700b3f58a4738c94bb5179ff0 ]

This driver does not call media_entity_cleanup() in the error handler
of tvp5150_registered() and tvp5150_remove(), while it has called
media_entity_pads_init() at first.
Add the missed calls to fix it.

Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
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/i2c/tvp5150.c