Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1064203rwb; Thu, 8 Dec 2022 06:23:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6R9lY6ZQXWQpy04UEH2CrOBtdnQiVZDwGFJY031JIB1qCmjnz/cSBs1RU19SDK0MMzioYG X-Received: by 2002:a63:1f08:0:b0:43c:e3c8:8c30 with SMTP id f8-20020a631f08000000b0043ce3c88c30mr68421718pgf.579.1670509438110; Thu, 08 Dec 2022 06:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670509438; cv=none; d=google.com; s=arc-20160816; b=Eu742y14DFyV2Z66o+KCLL3go7ez9kKQGu1aVUDOk3wwsGolWIM1MEdLYGbVIfLSmp 1Br6+PCUGZTUJIVh4nfJegOg/o5tC66JApX9LZaN5r4DpGq7fUAvIO7ts1nZTA7TuN1j rCsx6U8pQiCQetgYmf6H27WIazxkzexETfGily08k84R/l+EU02Qrdyuv6LGTndr71J4 TfYwL18T3cCTqCjuV5uNKKyP7ngV71YtdDnXSPMMIGzIWSHaBR84a9DMyy+tBnkcC/Nr XW+Elo2eD2PfLeBTF9efM3DHREicdSCQ499gVFuMPuqe1mmkiCGzI6PtXW1hGzJQnXDq K2ww== 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=4H86cqUfo0veX7ajDKOvCLkZuNLK31VBo7MemiXpJog=; b=xLVE5A/KeIXRS/kEEDrTi2Y4hLB10NXI+jRHd9OfjMIkoJw1ehJyK/UZ1h1IK31QHF Zp6FZZWVeuuzLNUJtxlBcVvgR+mqN2TlH89haoyOl4L+it9CkBMbOeZfT5VKeZhR0/40 fynRdvF7DGAg+V8a9v5OmYiInnZimIqgLaProGC/4PoL1ffBZeBK+ST0N/4wdH0monYR csAqQp+AvNCraGzUymjLU3+VvLi8Nv2UCRJChFyp6P3mrSAbiOO/y9pDg+y5UpkBPwZ3 uCWqJ9/343FgEtMJRM/fPzl5kfcEWjHlA0u6wFME8H3Lv+sKHYKa7+dyhAym6AsSiSTC VmfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SE28wRoJ; 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 u18-20020a17090341d200b00188ef298718si25335456ple.351.2022.12.08.06.23.46; Thu, 08 Dec 2022 06:23:58 -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=SE28wRoJ; 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 S229875AbiLHOUf (ORCPT + 73 others); Thu, 8 Dec 2022 09:20:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbiLHOUc (ORCPT ); Thu, 8 Dec 2022 09:20:32 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 492CDD2FD; Thu, 8 Dec 2022 06:20:31 -0800 (PST) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id CC93DC000A; Thu, 8 Dec 2022 14:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509229; 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=4H86cqUfo0veX7ajDKOvCLkZuNLK31VBo7MemiXpJog=; b=SE28wRoJfx3NxPUQTHch2c8hS6doHhE3jLz1I4oUI/wSV07e3fjfI03JjoiARh+xttgJQ1 56SGF19BmGFfw/0NXpIFIz2UPlhPUGQnk1sEXiEbfODkQ1VZjhiIgmVcpGYs1OnfrSVAaZ ZoeS0lZ65JVcD2QEcKt1hDWzRsJm5c+jY2G9ACM9WuQXJ1ACqmI+81Rq4pZxFvrvDrZhCP BtRKbXvZAr5xQxSAPAJbhTzgXpTV4pUuWVTVshNmCkfvebTiUycyV5VpRIy6pudrqg/v91 EZORjFCoQz4GAVPpNbbwVHB4VloKy6mZgU3EUA10pUISz1vgeQyXi0stkUE9kA== 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 v3 01/12] media: sun6i-csi: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 15:19:55 +0100 Message-Id: <20221208142006.425809-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-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 Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management") --- 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