Message ID | 20240429-fix-cocci-v3-9-3c4865f5a4b0@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 7B092C04FFE for <linux-arm-kernel@archiver.kernel.org>; Mon, 29 Apr 2024 15:14:17 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4ttCVejLR8CzTLsdiI8MCbPs9RpC5Gi6oxqXvzhSje8=; b=nBkf9zIWmw0lVx RqfHXPnzvW+LN/M96CuxZxaBx33FQggIT8QcvgpE8K4BBjP30yebaKYIhFHtc4Qij1LUGc1pj1wDM gRNq2yr79KUL08Hs3wVUd41qzFJaMPoZG5jK7W1Uj403jREdXHhbzq7wc5aLv+R+o5RT9bU23feWG HpQKZgsPv7mrsJyPESrIbO6c06V0FR6kD5oBPq+dIe0efW1rC/ohO3y2uyrRfslF4Zhu2+PQVMS7H e66wh4R5cHHDQ895DlQIJCPr2nC+uLJMyxZnv35TgC+77APXRLTR8/3FV5TN/DGpn5LaELA2AwZM7 9gjl+errPyrYmkmv3mkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Shi-00000003L5T-1Zqz; Mon, 29 Apr 2024 15:14:06 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1She-00000003L3L-2MXb for linux-arm-kernel@bombadil.infradead.org; Mon, 29 Apr 2024 15:14:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=JNRsm9gIh82mFVXKJ+HUiStpAhIByx8KXG3SUDPUD70=; b=DOHSy2ldswQESG+20T44MkW9V3 GbDU+WzUPS+Gd7z2WDrAF8U639HjNk2O3HddzKskQszFYDWBBXbmf0SX1r/WAqqr4vkQtcOW4jaD2 XOIghDW5SgGLqw0hUS1BAXVTUhkqmGaiKJcAZfXIp4bXr512h96adZoCVSbDwdkH2uwxrw5bADR9K 4hl/gE6kg9PS6fxXdFVzTWvjIyrkg+W9XyKgx/N8ps7baaYxhoCgsi8VHCQ83HRyRQT3ELADc+Rz9 Ej/v27hwYXSRjjZwqNM5GnwRM9cOm7V40dTr1O3PZyW1047J+4+DxhabrGonqYpDw82t8gPqvWzJ3 FhBXL2rg==; Received: from [2001:4860:4864:20::34] (helo=mail-oa1-x34.google.com) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1SdF-0000000GYM1-0wOd for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 15:13:31 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-22f01274622so2545204fac.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 29 Apr 2024 08:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714403092; x=1715007892; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JNRsm9gIh82mFVXKJ+HUiStpAhIByx8KXG3SUDPUD70=; b=hEc5++2UcZp97mqO1ECi/cGFqwIa0pZy13unj4rLqMDNCxYey3RVCahSnvXeP9f1wd QBIgMe59FJnPuPaXwa6Un6OIywAE/GoE90f6sK9Nd+oRDGdQrmcVFIMzqGo+7ptGcxY5 6saSjhmVLYcpuPgWvOFpkFpqYF+mBmur6dlNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403092; x=1715007892; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JNRsm9gIh82mFVXKJ+HUiStpAhIByx8KXG3SUDPUD70=; b=u7ni00IsGBHb002zk6k64hnj9VcpppMUqBvxp9Im78Y8YqScBNhSTFs4TNjT4v53Qy s/Kx343cMTWzih+wD6cpnYleeVTuSHCmiZNUbZe4lAWHwnGDe7OIZQgSFvfkYp2X2Zz8 ucATfWi1YEgMSyE5PmZwbFMFoAIwyCONzMW+S8G65FdEA7BPAKD/Y7HNXBeOlBVdcGCA 6wKk8l+GacKFqc1R6rMg+9UqhGqvGGlzGqvkS8NkfXmyaMO3A9SEHML3NY/eFNskN8em AiqvEuf6nu2HKFSjze0sZwaFYT+D4LeU4Hg0Qg9GNhGmVLZ31lRSNwNQwchqmzbGgVOV ri/A== X-Forwarded-Encrypted: i=1; AJvYcCX0WqIxZAlqPuHeJ5nYoTl5iguV/OCS7h7NF+U0I2WpPoi62VnptblQthY2M/pVNnsSeIDVaHsLY80i0GzlaT6NVeI13tSb2wQaNOjzE7YgrnRLVAg= X-Gm-Message-State: AOJu0YzaCRNsE9QEQWwEJzyuTNk9pgMxz483M+Xpj4PCkKrZK4KkvYM7 29hmelP88tA/s+rgziaxMUzH9y1LK0ucVM/N6Eelq7HqMAQYMkukEgP+9F6hZw== X-Google-Smtp-Source: AGHT+IGXcStN+XAFfYHJlQ/BhJGSDUpZDAykPn1StedMjlrpGT2G5swu1IRQFedvTjeL4JvuXpf10g== X-Received: by 2002:a05:6871:a416:b0:233:b5ef:3bab with SMTP id vz22-20020a056871a41600b00233b5ef3babmr9216406oab.3.1714403092563; Mon, 29 Apr 2024 08:04:52 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id p7-20020a05620a056700b0078d3b9139edsm10568591qkp.97.2024.04.29.08.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:04:52 -0700 (PDT) From: Ricardo Ribalda <ribalda@chromium.org> Date: Mon, 29 Apr 2024 15:04:48 +0000 Subject: [PATCH v3 09/26] media: v4l: async: refactor v4l2_async_create_ancillary_links MIME-Version: 1.0 Message-Id: <20240429-fix-cocci-v3-9-3c4865f5a4b0@chromium.org> References: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> In-Reply-To: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> To: Martin Tuma <martin.tuma@digiteqautomotive.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Hugues Fruchet <hugues.fruchet@foss.st.com>, Alain Volmat <alain.volmat@foss.st.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Paul Kocialkowski <paul.kocialkowski@bootlin.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Sowjanya Komatineni <skomatineni@nvidia.com>, Luca Ceresoli <luca.ceresoli@bootlin.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Hans Verkuil <hverkuil@xs4all.nl>, Sergey Kozlov <serjk@netup.ru>, Abylay Ospan <aospan@netup.ru>, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>, Dmitry Osipenko <digetx@gmail.com>, Benjamin Mugnier <benjamin.mugnier@foss.st.com>, Sylvain Petinot <sylvain.petinot@foss.st.com>, Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_161056_124475_01440B1C X-CRM114-Status: GOOD ( 13.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: Fix coccinelle warning/errors
|
expand
|
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 3a22da443a22..421b2b96bc8a 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -316,9 +316,10 @@ v4l2_async_nf_try_all_subdevs(struct v4l2_async_notifier *notifier); static int v4l2_async_create_ancillary_links(struct v4l2_async_notifier *n, struct v4l2_subdev *sd) { - struct media_link *link = NULL; + struct media_link *link; -#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) + if (!IS_ENABLED(CONFIG_MEDIA_CONTROLLER)) + return 0; if (sd->entity.function != MEDIA_ENT_F_LENS && sd->entity.function != MEDIA_ENT_F_FLASH) @@ -326,8 +327,6 @@ static int v4l2_async_create_ancillary_links(struct v4l2_async_notifier *n, link = media_create_ancillary_link(&n->sd->entity, &sd->entity); -#endif - return IS_ERR(link) ? PTR_ERR(link) : 0; }