Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1060057rwb; Thu, 8 Dec 2022 06:21:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Fpqc1DgKHqj+hIFLnBSehF+wX+xQhekNzRgbSyYkBu4f1cos2DGw/Mwjs5TE8W6Mq/0mQ X-Received: by 2002:a63:3c5:0:b0:478:9cf7:44fe with SMTP id 188-20020a6303c5000000b004789cf744femr20133340pgd.68.1670509266651; Thu, 08 Dec 2022 06:21:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670509266; cv=none; d=google.com; s=arc-20160816; b=G+YZFmNQ9lZBKUy2Nt85ONDpPiAmvGFoPG3gSosLty2IwEb2fuct/v2QHrlSEJZE3l IpxE+Vo80jXJDgqChabwUXnIVDxwXPCeuTz0M9x3AWrZPRQ5ZSa1LwaBEHm9LRCtwwNc Wa6EEvqhCfDiHNrP9nS+QjQf+VmI79/Tq0ciMkMZRI5/e0bYJiu2cXrz7XFxPpwf8fpg Tomu/7Z7Tv9vQsFWXjxCOgo0TTzh+MZNFdscghcgbAUqjP9XJrXbY1dMi4VcYWt6ShmY lBQexxK7ebs+AU6Fuq7pAgk68RTsynG+GXSspFyUNJpmUBe291H5CHfcbwdwowg5/Lb5 nc9Q== 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=WvRlYrlbJMKGccaYNkKHdao3X5LubosXk3E1lEkyYteT2o2BWOX+0BCjh8rmdxkK4E TiDbDjBlBewvns4wisuxyZwfz7JPnTJLGNJKg+xFeOFk8QVR+FjmH+S6uKbV4l9IoPoS DRA9X7KT1/pyYxfiRiOur3CaSN3+ltPr1T10RRpTRtQpPsghZr6kDXe9sjcecwrajKOA KkiPBAAjWWnNcAoCcd8KX8R7uY/xLKYjDkCyfhhgILKc4yjS6EvdqGZ1rWMerEpn7rE+ eM7o8Y4IH1KCSSUA7QUKbsnEwlTMH6REYnGE7M8WuoC1bGgUgrmSNdMCfY65N54HoSJd NpJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=deKqCLsx; 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 r16-20020a635150000000b0047715beb2a5si23351588pgl.150.2022.12.08.06.20.57; Thu, 08 Dec 2022 06:21:06 -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=deKqCLsx; 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 S230217AbiLHN4z (ORCPT + 72 others); Thu, 8 Dec 2022 08:56:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230283AbiLHN4d (ORCPT ); Thu, 8 Dec 2022 08:56:33 -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 D3B5A9951D; Thu, 8 Dec 2022 05:56:13 -0800 (PST) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 6CA972000F; Thu, 8 Dec 2022 13:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670507752; 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=deKqCLsxjB88RmwnIcZIHBybtsPdTrLSzv+zQgNRFNikyTIWDuEu9NLsEvKJL7YNC3G9df Dm+ax6gFUOJkNzsg+VlE6qQ4BY9SjjTkjEOr58YVY/gNK/FfaagWL6DhCjO/8Pss8MVKbM xLdyr3LGB+Cu+5eNn2GKWm+d1KJrxt45wXrxTJosHfzGD91tRb1b+jvK1gg3ar4CuDbFjl a1zs5PNPj0vwZmy/K/hHHa2Iww0yagn8p54cIpbDIbmnwCdDElETYGeYYHm5XYOGnNgXA9 mhtmXkKPIQkZaIl2//RuuuOZp+znQ9Z3o+ptvkYrlSiEYe68kC5G0zTTkDYydQ== 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 07/11] media: sun6i-isp: proc: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 14:55:08 +0100 Message-Id: <20221208135512.421903-8-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/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