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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/media/platform/video-mux.c | 1 +
 1 file changed, 1 insertion(+)

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux