From patchwork Thu Dec 8 11:47:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068336 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66DA0C4332F for ; Thu, 8 Dec 2022 11:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FBhtrDAkPomcRDYojJW4kwu7TTJURwfrQ6E9NILdsB8=; b=2cirhpDC9mqbDH mYeUcGeKfLv4BXhbczzZvw/GFK+2c6zi0LFgNi8fQMgKFAEH5h7qtHeXbEVJHFJKY5RYEB22MZpgX Nbqp6dM4GKQQD+4sO/ickZdCEYZ9meJkOp5un0iQlMFc97AnJxJ3FqRhO1Ggq7mH0yd41HS68JF6+ 0xpEBsHT7WfePOcLzidSxT1IBPjfVz/bh3JyyIRcASmfNHgEgiamRR40HP9YbKnq+vH4PdV+EZMwq OdZ7yiQPxMrxk5dKQs0rwtC6hU9g01uEmjJmOq4iXc//7nSVZZTk9VoNydx34LyRiPbqTZfiqhPJC 9JQQgmUHB6g3i6mo0xSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FQU-00FtHG-1Q; Thu, 08 Dec 2022 11:50:54 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNu-00FpUI-7I for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:16 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DC0A324000B; Thu, 8 Dec 2022 11:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NirQ4Z0H8CCFNO8YF35iEuHBJ67K2AC07Y4K8xGkunI=; b=dlGNyauohT4CoLW3XYw+fCDaDPtU8a3v2UOKSI0wqcvevc6rxyFnt2g3zIQ+DYQa4e37tM srYnxcABuEk1VtpY9Kq5FSUBb5B36aUJ4XVrPLth6APh8HbO5TQBkXBUTLSer+UkrSk2of 0dAMaayNJi3YQuE8eT6rNq7m8xZtg7okPfB+HvTcllTwn6SK3v8SpOdLLTDs5bFw3Oja6c P5urxxIIt/IgIZAuWRaIKyOrFa/rBYW5WqKJFx7kMmkwCwc+eiBcfs0Omg+qD8LhwWqScI xBrRc4RVSykMkkBuzcfZU+2qvtzdU7k/qIfKGBS9aD6vfMoPou/clp4Cz+WVnA== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus Subject: [PATCH 6/9] media: sun6i-isp: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:39 +0100 Message-Id: <20221208114742.399461-7-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_034814_481446_90196FE7 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Explicitly set ret to zero on disable path to avoid a related smatch warning. This makes initialization at declaration useless. Signed-off-by: Paul Kocialkowski --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c index d69d2be0add2..a95709d2c573 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c @@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) struct sun6i_isp_proc_source *source; struct v4l2_subdev *source_subdev; struct media_pad *remote_pad; - /* Initialize to 0 to use both in disable label (ret != 0) and off. */ - int ret = 0; + int ret; /* Source */ @@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) if (!on) { sun6i_isp_proc_irq_disable(isp_dev); v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; }