Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2566867lqp; Mon, 25 Mar 2024 02:52:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaxek1uhvxpmxfAHFnfakeO50PJradT7yQ9Iap97SH3NikqbMHDlzdm30+x4cOXOdrEUHjBuiKaUS1CVBJBUZO3pf3DMP2sOanDsrWFg== X-Google-Smtp-Source: AGHT+IFdYkvyq7YmWcdsUh1n3tgTp4jneYvLZc2laLpu3OQwLQU+3xNaIKNHsvM8hWPBxjtcWwHq X-Received: by 2002:a17:902:fc45:b0:1e0:983c:d686 with SMTP id me5-20020a170902fc4500b001e0983cd686mr8414056plb.20.1711360368286; Mon, 25 Mar 2024 02:52:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711360368; cv=pass; d=google.com; s=arc-20160816; b=mY4dIrZBIymLGQFJnsQleRh27tecOwT7WiDHbppBo4S5zr9qFL0COW5axZOPp/Cz4J RDqI39B/9IIjq6cqAsNmkytI4GE+qwGvBKCROKnQt4XfvlsJUKF+aQxAx8tfjhSJafrQ vQfsyRx85MrTEZ2Jv8t/A4huzXA0qf48CK6QHDWFytTSXGXJQaQ5VHPD3y17fGfQTQp2 lJesymCPMHxQV9Hc0RWShe0Dq3jAQwsiFmNfiBvDr6sB/6mDHWEG1Rv53Pf2zQQ6R4Te qGl8e94xTAO3d/RQuesjrD7j7Q5BbJmTK47VJ0RQDAv4LMAv67WQ/FXkXocaacxXE3Fj 4daQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VisxU4xXsMVKE4YuONOz28d6UVmU1/ycAxx9LaO+E3U=; fh=KJQR4vjPWqw1Crp1HMOZnYdiCqQgRl4FNsvnxDw8yMU=; b=1ECrT30fE5FY/v9mwJd0JLuj87K4n9w0YQwyF73aK3xiu47Fa2+rZ0Xq1xlIxKuBoX L1eT8d79IDsM3uOios8qMoHgFM20KSJIJPOMen0Xz+is1hgW3dzyK9AK8z7KEu9t8ZcQ 35/LgAnFSiWtmqD7BclE5Kg+tzLAYJNxRHm81Et7xdMbGl1acDqbuVYK/lp8XSLhNtQt d/Calr9S0YmxRQUpQibGxboo7FodolhKweCIgIN54K46CCNfyqmt3T8sjKZaXyHi5S/k ZEwKb+AUAcC+vBqJCtSvvysvbUAO4eKwohM+Nhfj8vaBJsKBuYD9Lejb3v97pNobfl57 1Icw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IsBzCO/G"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n15-20020a170902e54f00b001e0b2573283si3187866plf.544.2024.03.25.02.52.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IsBzCO/G"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EA3662A84E7 for ; Mon, 25 Mar 2024 09:52:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04A013913E9; Mon, 25 Mar 2024 03:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IsBzCO/G" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE46C1FC99E; Sun, 24 Mar 2024 23:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322187; cv=none; b=lstYZxbe5J9qVp6F0mr9HUohfMZfZMQwzziv7brE1DwqTapTsUARLqEF/owZktME710gTjdZMl4SO+iJCjLS1ZipX5JzCfv5BFD+15h0WO6kKRGEWUy/nhMXezxh8MlU/c7rcGluHKXlffGoX71DimkekmGwDzuCW35PqkWv004= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322187; c=relaxed/simple; bh=CwWwXVhHyKnLQ10moKJIyAHUeLsBYRK/aKO6LwRtc0U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e6hXsHZqSkvds9lMb8fq+ghSwFoL7OZrM3qK+prGcAHEEcQfI5n7BmfDv/eve9be2+hpWYPVvSHKJkKVG6+W5I76XXnwRCQcA/yhwwG0lNjNasMdNNAYcJWNvQsWih6peMSJ0EbJx+C+kEdu006YsqsAC+pFXbuLoSr2hhutbIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IsBzCO/G; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4148C433A6; Sun, 24 Mar 2024 23:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322186; bh=CwWwXVhHyKnLQ10moKJIyAHUeLsBYRK/aKO6LwRtc0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IsBzCO/GYnkCY9U/SDgvnivtAroLNV1SsdTzvK+15+gOa8naqgQrt3biuRGHvvXCT 8ICq9TYwIJqD/qGx3zhvM7uFSiS/VHnKuA+zzZV9wErBzU7b+RfwYKr8Ge3N30OPOj Gtr6J5sy4sCArD4VgUXFoKOwJa0QBf8TJCjxH7xW7Ibk4DGa5ykzfxXafNKKoyw0HW GGFXzkHPMppBbdknEOW6qfYuJ7oYGmt8Sd/GYKsK/gWCnp3dUr9dw+dfRp+kRTaijK 5hb+JselbRb6GcX5vqXhZpB29LUkU2ACZNGpMPOOX5q+YaqoFVkrWoAf9Rf+OZ6s6j /aBrSclmvc7VQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nikita Zhandarovich , Mauro Carvalho Chehab , Hans Verkuil , Sasha Levin Subject: [PATCH 6.1 265/451] media: em28xx: annotate unchecked call to media_device_register() Date: Sun, 24 Mar 2024 19:09:01 -0400 Message-ID: <20240324231207.1351418-266-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Nikita Zhandarovich [ Upstream commit fd61d77a3d28444b2635f0c8b5a2ecd6a4d94026 ] Static analyzers generate alerts for an unchecked call to `media_device_register()`. However, in this case, the device will work reliably without the media controller API. Add a comment above the call to prevent future unnecessary changes. Suggested-by: Mauro Carvalho Chehab Fixes: 37ecc7b1278f ("[media] em28xx: add media controller support") Signed-off-by: Nikita Zhandarovich Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/usb/em28xx/em28xx-cards.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 4d037c92af7c5..bae76023cf71d 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -4094,6 +4094,10 @@ static int em28xx_usb_probe(struct usb_interface *intf, * topology will likely change after the load of the em28xx subdrivers. */ #ifdef CONFIG_MEDIA_CONTROLLER + /* + * No need to check the return value, the device will still be + * usable without media controller API. + */ retval = media_device_register(dev->media_dev); #endif -- 2.43.0