Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp863151rwb; Thu, 8 Dec 2022 04:04:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rDg1ZWjAeXdYY1dzI0GCg3E6Azwt4JZa7gUd7jQX/9yxT6PmkI2CKnye1VuaFTmjDrraM X-Received: by 2002:a17:906:2ccb:b0:7ad:9892:921a with SMTP id r11-20020a1709062ccb00b007ad9892921amr76966809ejr.506.1670501043108; Thu, 08 Dec 2022 04:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670501043; cv=none; d=google.com; s=arc-20160816; b=B0KdnqCHKdJZglqG6am3P1jy+imai82k+Fn5ilfiIMotxqriljcdVPrxNP+JB4BXaX aN+j6HL7beLnl5No6pgU/mwP0isT6ge/vMCAPKvQzUBxkW44hVLlidXWKi9h+JYOHI3t p2vUhRTpqqEXEiln1F7QqSNctKXplVSSoOVhADnFgkTjBNAf/yUalmY/RCr+VmEOlG7j 8UYvk++w1hg59qAEehCvpTLFymE5wp/FcDYlvEZjrCusBnAvqmC+FZzkvzaCeqiWWx2h QIoTLBbX4znLMtPc3gCdXx07NzEyUl4VAhoRTle1xwu+qInI4Dl5F2tka4IZGgOFpDy5 mMzg== 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=teCRuR7uB/zG8Ky3QpkFKDtDey6oXej3KtDzR57/j3AGEBwbDCBGbMch7vnbxSS3rI Iryu1Ow55cixC3X0RtgWPSYI1xFp1hap/dldaXUmAYpwhecIs1q8XxNlS7x/wpt9DFtC mjbGCCKAQNVpUY0PQmHSK/QolXWohsCTVyuuHpktllt7bEg4iWOFTGo3g38ZHlaewo7A NC4BU189kuNgeAYAy1MQZBivP4eXGLY4TgCWuzBm+wmQhHqDFp5n6DtnRpsb+/3Q/L74 I/2mWQ3CZfVesngICZ8WH6gZJbWX8JVmw6gLwEfkBehKkID4urw/mJwNbtVvGjVFYa7m VCwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=a00ISrOk; 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 xe8-20020a170907318800b0078d805901b1si6780622ejb.489.2022.12.08.04.03.44; Thu, 08 Dec 2022 04:04:03 -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=a00ISrOk; 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 S229890AbiLHLsU (ORCPT + 72 others); Thu, 8 Dec 2022 06:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbiLHLsJ (ORCPT ); Thu, 8 Dec 2022 06:48:09 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA407BC22; Thu, 8 Dec 2022 03:48:04 -0800 (PST) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9E5A6240007; Thu, 8 Dec 2022 11:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500083; 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=a00ISrOkO4WtKc9pf6mbqrhA9oNkl/MdSK032EXIU09xlDA5iQla8rZ+eIK5vaJ2VPBwNY /FHhG8dL1xktAzEgM3wIOQw3SKCtaxOINV8ax+UK2HFbm9jDvhvbCJlzCZz2dysjqw82MQ +CHNpNH0LTbK8qye7D8kKcwAQ6tlOc1ppDk7Kxo2ZtZPom0uf/c9D2hYzBiWQuVf5TCzI8 +9lmS8s0r/kALXJXOuhhwymTb6bK9wCad0HmDOM5dJ89zgt3u1W+jmnj6FJTqfZsjaG6/D x+m/33v1b4h26XvfYr6X4AAV6iBz1xyxrKjXXBdenkj8NGMYLaPPG5qlGDYWSA== 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 1/9] media: sun6i-csi: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:34 +0100 Message-Id: <20221208114742.399461-2-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 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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