Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1031024rwb; Thu, 8 Dec 2022 06:04:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Fu6Ogn3J3q16HK/EnQZtbhJEaRG94NaiitFMLTBl6O+X27okQ+KKTj07mblku7Tx/fAdO X-Received: by 2002:a17:90a:fb86:b0:219:26b5:d41e with SMTP id cp6-20020a17090afb8600b0021926b5d41emr56074465pjb.20.1670508284416; Thu, 08 Dec 2022 06:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670508284; cv=none; d=google.com; s=arc-20160816; b=w+90lERH22V6SXnZRYmab4ShA/mkMPsJN8xdFCo4PK+9VEk8kBxtG6aenE52ARXbg5 RrlQItfcx+R70r6pKzczYwbkyHyq588vlSENRxs5y607C7r9eo9HAH9seTRhNc+e31Z6 yh6dqmQutA/OQs4DyfwYSWIahNVHREwn9EWr+PLwAHQVx++A+Hld81Bvx2pnlvM8LWOh VvE69qhrgEpKUCFjTcNDpmG7ZL2x3AijU+HxFYME8/B2uciuFGqZUj5W5XtoDXpm42Ep gw3hj0QVVsuiUGacivjaQkDyOlsn30cZDMN5Zq9uzTzqaNh8tyIAcl+hMMxmw0Pk5RfD W0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g8Fr5IFDx706AN895Lw8QOX+f28RaNPliLSLDFSc9/k=; b=kWq1TIF7bTa/fJb2xM5Mwwq7cgFZ5Dv/iMAuKDBlSh1ehcv+46pOIdZ39twE/ArY5+ WSQVyg+RLD5+ug8I41AFNtkeVe0+5697t5jgcfuKFMVTKnWhNcHHQrxoEc8DzABmdhTc mrppR49YF9GXorbaqAERTl4cGQqCyzrq/M61knLAjrUy1zUatgfTPwIeGQxCMPHCVp/J yHbBYZTbMg8ZlXVFnlNSLehz0N0zlk/+8r5i57D4EyCgEftVWPJEn7EZBeSSdSmpMWmU DjuzNYPD0X2xKWGALWzMjFSRWACxh+4xLaCfWjx8IRJmxNLpI8KcmMfKQ1253hWMYGtG 49YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DypI5lfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a056a00248f00b00557bb4f6977si25233116pfv.106.2022.12.08.06.04.34; Thu, 08 Dec 2022 06:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DypI5lfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbiLHNzq (ORCPT + 74 others); Thu, 8 Dec 2022 08:55:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiLHNzl (ORCPT ); Thu, 8 Dec 2022 08:55:41 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF81B60361; Thu, 8 Dec 2022 05:55:40 -0800 (PST) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 0B4602000C; Thu, 8 Dec 2022 13:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670507739; 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=g8Fr5IFDx706AN895Lw8QOX+f28RaNPliLSLDFSc9/k=; b=DypI5lfuiecIIVcaJEqjMx2cjyjzOxg5nkvZ/I39jQRaEJS+7rCAdgPvs0e9elXqL2srzs hRvx2ocG9BH6ufyiJaazBQoUzZdh+eU8mVlGsBV5jLNX8IM8E+EE1Zk74ZjQTHhMYqy4Qu 6uTrRiep8ArzZkRg1VmjynfDfnTAknYjvT74mzZSobhiAPO2fgEYN4SHW7DdBgn5DJQY1G oRZRN0oiGKCN5UmATvz90D2CMBQ5Tms3zCa65OdHzG8480mx89vbQLdTzNTAzjDdXcOkSF 9+SKW6g+lIe6X+LXCluqkJ+ZH3+qrljx/g1aXVS6f8zLm98ngCKrr0NsDbp4rg== 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 , Conor Dooley , Nathan Chancellor Subject: [PATCH v2 01/11] media: sun6i-csi: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 14:55:02 +0100 Message-Id: <20221208135512.421903-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208135512.421903-1-paul.kocialkowski@bootlin.com> References: <20221208135512.421903-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c index 86d20c1c35ed..88df3a73ebfa 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -415,8 +415,7 @@ static int sun6i_csi_bridge_s_stream(struct v4l2_subdev *subdev, int on) struct sun6i_csi_bridge_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 */ @@ -436,6 +435,7 @@ static int sun6i_csi_bridge_s_stream(struct v4l2_subdev *subdev, int on) if (!on) { v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } -- 2.38.1