From patchwork Tue Feb 26 02:18:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 621 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E196601E2 for ; Tue, 26 Feb 2019 03:19:15 +0100 (CET) X-Halon-ID: e9302da2-396c-11e9-985a-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id e9302da2-396c-11e9-985a-005056917f90; Tue, 26 Feb 2019 03:19:14 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Feb 2019 03:18:50 +0100 Message-Id: <20190226021857.28255-2-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226021857.28255-1-niklas.soderlund@ragnatech.se> References: <20190226021857.28255-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/8] libcamera: camera: fix bug in error check for streamConfiguration() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2019 02:19:16 -0000 The return statement is missing altogether and an error is silently ignored. Fix this and also update the empty map to use the correct type for the map key. Fixes: 65ea2422d24a3073 ("libcamera: camera: extend camera object to support configuration of streams") Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 1acb399c80a6fd3e..6409d10ff88b2189 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -213,7 +213,7 @@ std::map Camera::streamConfiguration(std::vector &streams) { if (disconnected_ || !streams.size()) - std::map {}; + return std::map{}; return pipe_->streamConfiguration(this, streams); }