From patchwork Thu Oct 22 08:17:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10195 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 C9872C3D3C for ; Thu, 22 Oct 2020 08:17:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A2B4C613E6; Thu, 22 Oct 2020 10:17:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VIoeAs/R"; dkim-atps=neutral Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7332160351 for ; Thu, 22 Oct 2020 10:17:50 +0200 (CEST) Received: by mail-lj1-x244.google.com with SMTP id m20so981096ljj.5 for ; Thu, 22 Oct 2020 01:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ur181zJY4BDVdAz0cbEk0Cx2tq726LoO8afr6LItANI=; b=VIoeAs/R2hVf7aG+5+HEK1RJUHZb8/Yi3P0hsQ7eJMlQLYS25rQzO0HwN6EwavP1iD y21/Cd4OQdiqhmkAkYJs8wtasJ3ME84UdenK/U21HQ9fYvDBYvgRISB1hFtDwjzc9biS eHV4efrX4kC16us8l2fD77JQT72/n0xPfTPtM/NUFk8gHFdhTB7KfdznnL+WghDkMC/c qsFTkDYglc9vMUNVWiANABRiL/mGNjI86XqBc+rxmZTZuuNncN+wontzCYH3D/bxvCxx a7fKi+IvkJGyUZxriYPA9JVP1Q4KBrDq5rtW3EgXQaexSTELE+/9ymc55a13szV3H07m fVqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ur181zJY4BDVdAz0cbEk0Cx2tq726LoO8afr6LItANI=; b=jiRr9KArHNUaKoqXHS+dQfGvbXwWHaScENyW0CC9wyLv1Dhenmt3KzDvyXHJVTJRyq tKQVfjlGKqed3wmaFU88pgO4Nol0IwO8E1cLjpGKRWioO3yIGBLTTRYC+6XX9eCl9qI2 i3rCess7TPOi3HS3u/4+04eqIu8j6V7b3u7JsOTpVmsSmpqVSRGvcPyzd4d0Dt12tUh0 gCOOSAOZWPyoD53lBY7xu/9EUEG9KZAnnktdPUjB0AWvhezb3vfc0Z8bJ2kmdjtXK7b4 r6TjowTlP89vzwetXVxKn78edUE+Oo2nC5KpYeP7WuLLEeDgz1aIMu8V+yHw4UvqddvI CWww== X-Gm-Message-State: AOAM532GwntnHfNTDVI21jotNuYRFxsO65CX/4q9f9TWPapy4ja4HWte 5h04lpM9eUf3Sh/EoBSwUp9Jdyw0fXKF8Q== X-Google-Smtp-Source: ABdhPJy9hUTNIf4xIeUHhig9cDP9BrYGbQEJ71iyV4vOfeE3m4OykuYKizSG4errTR+eX1Tk/fZ6Cg== X-Received: by 2002:a2e:3915:: with SMTP id g21mr520049lja.18.1603354669786; Thu, 22 Oct 2020 01:17:49 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id l3sm187007lji.36.2020.10.22.01.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 01:17:49 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org Date: Thu, 22 Oct 2020 11:17:29 +0300 Message-Id: <20201022081731.36217-2-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201022081731.36217-1-tomi.valkeinen@iki.fi> References: <20201022081731.36217-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] pipeline: raspberrypi: return an error if setFormat() fails 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: , Cc: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The method calls setFormat(), stores the return value, but then does not do anything with the return value. I presume it is meant to fail and return the error. Signed-off-by: Tomi Valkeinen Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index dd62dfc7..aa8d9340 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -586,6 +586,8 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) * because of flips in the sensor. */ ret = data->isp_[Isp::Input].dev()->setFormat(&sensorFormat); + if (ret) + return ret; /* * See which streams are requested, and route the user