From patchwork Tue Apr 14 07:06:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 3457 Return-Path: Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0397462E31 for ; Tue, 14 Apr 2020 09:06:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="iSxTdUz1"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type; s=s1; bh=S+v4RAoVKLe0XvAFmWW4et8axI5VN1wdFf8ju951NJY=; b=iSxTdUz1TgP+ysEVXruFPMB7XJU7t2b770QIn7XISR6ckyCCYw+Xx1O7dZekGLrS9po9 4dynmsh6TWU8bxV3Y3BrX7j+x2bDNUm2d69bvxq/+0YtB7vMUammyM0vBtzhru7WIZFdXB EDHAdbuVEWL/RMJ7wTYQbM7Z/HQm1fBJU= Received: by filterdrecv-p3iad2-8ddf98858-sn8p2 with SMTP id filterdrecv-p3iad2-8ddf98858-sn8p2-20-5E956111-26 2020-04-14 07:06:57.432960553 +0000 UTC m=+1586563.220500062 Received: from mail.uajain.com (unknown) by ismtpd0007p1hnd1.sendgrid.net (SG) with ESMTP id Xhih_PAwSjGBhw8mX9etdw Tue, 14 Apr 2020 07:06:57.100 +0000 (UTC) From: Umang Jain Date: Tue, 14 Apr 2020 07:06:57 +0000 (UTC) Message-Id: <20200414070642.22366-2-email@uajain.com> In-Reply-To: <20200414070642.22366-1-email@uajain.com> References: <20200414070642.22366-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPclKwCK9CCZVFbQyNjpl2ex98oO3ds1tcaHYAc4KXlWkV6EnsjS/a9ug/U04JAxz/w6m84h2HfbnBI0v0uPgxxqMhsyvu1gH8g12/Ozjx0nFCqkAxwNQPxgIqXwqV71yIRMHbwsdpAfwJqg8mmKWGSd8BDHpxqf7UFDRIvhVnn/oh7hdPGYjHNZPVBljhL26wGmSCgy3Y2W+RMli+aqNHYCg== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH 1/3] test: list-camera: Handle error on starting the CameraManager X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2020 07:06:59 -0000 Pointed out by Coverity DefectId=297074 Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- test/list-cameras.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp index 55551d7..e6a407a 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; }