From patchwork Wed Oct 28 01:21:14 2020 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: 10283 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CE326C3B5C for ; Wed, 28 Oct 2020 01:21:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4B5EF62244; Wed, 28 Oct 2020 02:21:25 +0100 (CET) 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 2BC536034B for ; Wed, 28 Oct 2020 02:21:24 +0100 (CET) X-Halon-ID: de43cc4b-18bb-11eb-8ba4-005056917f90 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id de43cc4b-18bb-11eb-8ba4-005056917f90; Wed, 28 Oct 2020 02:21:20 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Oct 2020 02:21:14 +0100 Message-Id: <20201028012114.3848208-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_device: Remove unused set of ret 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The last assignment of the ret variable in getControls() is not consumed so it's unnecessary to set it. This likely originates from a similar code flow in setControls() where the ret variable is later consumed. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_device.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 31d4dad0ee47b734..f747ba790886cfe0 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -243,7 +243,6 @@ ControlList V4L2Device::getControls(const std::vector &ids) LOG(V4L2, Error) << "Unable to read control " << errorIdx << ": " << strerror(-ret); count = errorIdx - 1; - ret = errorIdx; } updateControls(&ctrls, v4l2Ctrls, count);