diff mbox series

[1/1] media: video-mux: Add missing media_entity_cleanup upon async register fail

Message ID 20230502141543.2503664-1-alexander.stein@ew.tq-group.com
State Accepted
Commit ad5929547b545f6335f7a65cd5dd978967a02be3
Headers show
Series [1/1] media: video-mux: Add missing media_entity_cleanup upon async register fail | expand

Commit Message

Alexander Stein May 2, 2023, 2:15 p.m. UTC
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>
---
 drivers/media/platform/video-mux.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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);
 	}