From patchwork Thu Dec 8 13:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FDBFC3A5A7 for ; Thu, 8 Dec 2022 13:59:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FBhtrDAkPomcRDYojJW4kwu7TTJURwfrQ6E9NILdsB8=; b=tXMB9Iel8G+JOE Wv1ivMPvHh5FhXcVi2dJGJKeRDT2f2EN5hB3+UH1giGTcEynnfYnJzCKumhkDBSIZrRSlNfsOl16V whfluTzvsyPJYf68IKd1Kz+kVEu7l+6EFtF1CV2zhic6u3Acp+cxMmHfEZ2eWXA4cNTWZ90aJDPHf MpNAR4tuVek150wjkY9spQMfwydAUMDTncPVoXg3teXPKi+zwPhvroCDNK7rCI2yTKe2g2M1piAf/ KvXqm+1lM8yyer736UGYpcjo91cGWNKllfL+wpNB7CmfsFMGypwEYY5S2Rbv3dQ/yeFQfArnVidbw zhy7m6HUE63x9aKULKpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HPa-001Sqz-N7; Thu, 08 Dec 2022 13:58:07 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HNS-001Qzv-0s for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 13:55:58 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_055554_267960_96A24F27 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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; }