summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@ew.tq-group.com>2023-05-02 16:15:43 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-05-25 16:21:22 +0200
commitad5929547b545f6335f7a65cd5dd978967a02be3 (patch)
tree985b5516c670ae8219ae976c1335b501397446f3
parentcd78824dd989ad733b650f42e078095ff231a215 (diff)
media: video-mux: Add missing media_entity_cleanup upon async register fail
Although media_entity_pads_init has been called, a call to media_entity_cleanup in the cleanup code was missing. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/platform/video-mux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
index 1d9f32e5a917..b244873d593a 100644
--- a/drivers/media/platform/video-mux.c
+++ b/drivers/media/platform/video-mux.c
@@ -474,6 +474,7 @@ static int video_mux_probe(struct platform_device *pdev)
ret = video_mux_async_register(vmux, num_pads - 1);
if (ret) {
+ media_entity_cleanup(&vmux->subdev.entity);
v4l2_async_nf_unregister(&vmux->notifier);
v4l2_async_nf_cleanup(&vmux->notifier);
}