Message ID | 20221208142006.425809-3-paul.kocialkowski@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp224134wrr; Thu, 8 Dec 2022 06:23:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf7alMGApjMLBXq5pXQKT7nfzvM/6/BIBg4ChoL8pJFGEkE44hQImgrNxGfIifeHImMqxGPi X-Received: by 2002:aa7:8d5a:0:b0:562:7f16:7407 with SMTP id s26-20020aa78d5a000000b005627f167407mr100128115pfe.15.1670509406721; Thu, 08 Dec 2022 06:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670509406; cv=none; d=google.com; s=arc-20160816; b=iPbpLW+uKYIj9WJyvIFYt6LAmAuGG3SNhOJJv++WqzyA15RQUFQXLTya0DXx53M0ar c/hzmL2dQC4XwfzlN806brIGNkvqQrT3qVcn8v2b2ZaHVWsncbrqWhRF4axDdcl65Scy cAsQrDYy4PZaY2dJT0XZHnGn3WaIBNMu4/llApEZSKwh9TCIBu2/j6Ufm10AWfC7qkz/ gvlAHj0tBSJZtb4FBPQ3ublIfpIMIM5VdNOXI/YT+YmA3YvhDe98EpCJ4FHjbTADu52y H2YR61hYtzxxg5bSVxUYMwouDHHp/BmL9Tn4icELKce67KJz7PmvYK+uiDRB5EtUF+hK Kjww== 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=YYTNcaefDb7Hq3EpjUs2F8iw4f2OIjP/h6YQGK4LD5Y=; b=vGrZCSHgtkbWX3KhhasvpICowOgIESG2N0L6on/NJK5FJnOrJpIRIA+yoDSOuYya42 v2kM6cP7WO3QQV0ZwOzI0TEUk+RyvfReqh+eq90vECIO/zuhWyxTakDiGIL5Czw4gpCT +z/oQU0pYUifTzGRJRYsWBm7c2eRvXw4fkNe7RX5jJXRekyFmkyk0xgHOdiZk2bS5z1W kCfLxhIlxek8GykhHmKyX+7aQKRyYHW707lJTMJ5AkBbBS/vaD4Sz5e2Z4KN+7PJPEYM VW97sfeOTt1+i4DU1IszDO74GwNBl4Ft3niYV06SDkERlg+OvwVxsCj7FOKfiF861NLa O/Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GgXtQ65E; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020a654541000000b00476f2b11c08si23715500pgr.813.2022.12.08.06.23.12; Thu, 08 Dec 2022 06:23:26 -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=GgXtQ65E; 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 S229892AbiLHOUi (ORCPT <rfc822;foxyelen666@gmail.com> + 99 others); Thu, 8 Dec 2022 09:20:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbiLHOUe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 8 Dec 2022 09:20:34 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F609D2FD; Thu, 8 Dec 2022 06:20:32 -0800 (PST) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1583EC0004; Thu, 8 Dec 2022 14:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509231; 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=YYTNcaefDb7Hq3EpjUs2F8iw4f2OIjP/h6YQGK4LD5Y=; b=GgXtQ65EjvZGV+VlKH0VTsXbAs6WxZsJ2xOxvmyTl9E0onBA+lb8gneodXFYRyvwmE4mfE SLlmRZf960OCcUD3eINNLNEW7eaR8Pms/VOIfPsA/rAltgO+fNFSt6SslLRulsag+pvtbz 5UxsXbJJOJAuQpq2qFvB7QAm3n+K7UrbJvgQzOyJsPboLeaClkMTl1RyrCElm6oHrrVDcS rQyeu6q63xvwxkauZlWh1Io66Xs6yI41RSYKuQiuUiXVxCaLGIa1xf5nySAIw+z2qOmjQy 3Akvp0PMikSnjr4vyIN08wFoxufv+eIzCQNs/Y6Z6cDoDM6nsetNuPpU5ajeMQ== From: Paul Kocialkowski <paul.kocialkowski@bootlin.com> 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 <yong.deng@magewell.com>, Paul Kocialkowski <paul.kocialkowski@bootlin.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Hans Verkuil <hverkuil@xs4all.nl>, Sakari Ailus <sakari.ailus@iki.fi>, Conor Dooley <conor@kernel.org>, Nathan Chancellor <nathan@kernel.org> Subject: [PATCH v3 02/12] media: sun6i-csi: bridge: Error out on invalid port to fix warning Date: Thu, 8 Dec 2022 15:19:56 +0100 Message-Id: <20221208142006.425809-3-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751656071452632367?= X-GMAIL-MSGID: =?utf-8?q?1751656071452632367?= |
Series |
Allwinner A31/A83T CSI/ISP/MIPI CSI-2 media fixes
|
|
Commit Message
Paul Kocialkowski
Dec. 8, 2022, 2:19 p.m. UTC
The enabled variable is only set for a valid port and used later,
which triggers an uninitialized use smatch warning. Explicitly error
out in that case to fix the warning.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management")
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 88df3a73ebfa..4517c0346eef 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -663,7 +663,7 @@ sun6i_csi_bridge_notifier_bound(struct v4l2_async_notifier *notifier, enabled = !bridge->source_parallel.expected; break; default: - break; + return -EINVAL; } source->subdev = remote_subdev;