Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1002485rwb; Thu, 8 Dec 2022 05:46:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf46g/XYHAF3KtATSnIL7pT1HitenwSHFnUbAslkGAtsIA55HDSo4jv3vYsnIXfZ30YUJobU X-Received: by 2002:a17:90a:c915:b0:219:e744:d8f4 with SMTP id v21-20020a17090ac91500b00219e744d8f4mr15412083pjt.242.1670507194805; Thu, 08 Dec 2022 05:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670507194; cv=none; d=google.com; s=arc-20160816; b=UH1rsQ668xv3fS1CjZHSJUzyHi3oE0NRtYilmLTBse3vXr0Tic173FzYmVtGZSgXZ8 2shE0mLA4605uOUSt8RrcFw+tBaHcAJQ8QfdNYHaJKD7vSWhrNPIhJZueJuOJblZhk5N kUOMKFYUZCbWpVpx+DEe+WxieureI0qhC4jRtFBlWpoGK+cU51XalphWmXyx3iEbsc3/ YnTf2f7mkkvRJSCuFAZHesgYxYLYpqckkHz59OogZCnOlkVNO73iNl7bbaNt9M3pxd5w xazHdEsacLv5uqGhlPRN7jWizkLf4ZPCBaE5id8xOnrxdstY2E0OFztNxf0leBkgT4yz CXmA== 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=NirQ4Z0H8CCFNO8YF35iEuHBJ67K2AC07Y4K8xGkunI=; b=SFQyOorr6B9ajrykBNEEePeLYRgobyqvavoY0sT5aioF96zFbxqlJs/sOy0CPtonEh D0Vm9u7O6MbA69GcA2dP+27SV1AfXXcRzmfR3w2hI3wtf7SqMurNx6e9G9TjeCYL908F QFYV7IPNebwhz3kRejMY7GfRXDxXVzRxdREscAhpCFZW8gXBB+xHJ0viD2aieXOsOe+P Rc9/6DpPIDaP/wBmIWepmLZe2+ZJE0YOPzDoixlCmVdV3Wc86o7xl8CFBWh4HHR0mABF FMv1AGz9kz1bodnXy3zWvCNLIJwt5+ASxVksI/SrWZKEVr/2cPpFFWBdtDa3fRkcNxkL BOcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dlGNyauo; 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 r123-20020a632b81000000b00479051135c8si3175459pgr.326.2022.12.08.05.46.25; Thu, 08 Dec 2022 05:46:34 -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=dlGNyauo; 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 S230161AbiLHLtY (ORCPT + 72 others); Thu, 8 Dec 2022 06:49:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbiLHLsS (ORCPT ); Thu, 8 Dec 2022 06:48:18 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F417984DD2; Thu, 8 Dec 2022 03:48:13 -0800 (PST) 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 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/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; } -- 2.38.1