From 5868d73e77916812d60cb60ee3cade785f6492f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sat, 13 Apr 2019 23:58:31 +0200 Subject: libcamera: media_device: Open and close media device inside populate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the need for the caller to open and close the media device when populating the MediaDevice. This is done as an effort to make the usage of the MediaDevice less error prone and the interface stricter. The rework also revealed and fixes a potential memory leak in MediaDevice::populate() where resources would not be deleted if the second MEDIA_IOC_G_TOPOLOGY would fail. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- test/pipeline/ipu3/ipu3_pipeline_test.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test/pipeline') diff --git a/test/pipeline/ipu3/ipu3_pipeline_test.cpp b/test/pipeline/ipu3/ipu3_pipeline_test.cpp index 953f0233..1d4cc4d4 100644 --- a/test/pipeline/ipu3/ipu3_pipeline_test.cpp +++ b/test/pipeline/ipu3/ipu3_pipeline_test.cpp @@ -71,11 +71,6 @@ int IPU3PipelineTest::init() return TestSkip; } - if (cio2->open()) { - cerr << "Failed to open media device " << cio2->deviceNode() << endl; - return TestFail; - } - /* * Camera sensor are connected to the CIO2 unit. * Count how many sensors are connected in the system -- cgit v1.2.1