summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-04-14 07:06:57 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-15 01:09:23 +0300
commit04d6cd14c55a8fe5019090255f1bed7586f0fc3a (patch)
treec5249e6ccef99773c405be830456d50cf82e50ce /test
parent36ad4eb188e078c9ec577213872febae57185646 (diff)
test: list-camera: Handle error on starting the CameraManager
Pointed out by Coverity DefectId=297074 Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r--test/list-cameras.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp
index 55551d7e..e6a407ac 100644
--- a/test/list-cameras.cpp
+++ b/test/list-cameras.cpp
@@ -21,7 +21,10 @@ protected:
int init()
{
cm_ = new CameraManager();
- cm_->start();
+ if (cm_->start()) {
+ std::cout << "Failed to start camera" << std::endl;
+ return TestFail;
+ }
return 0;
}