Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2386548lqp; Sun, 24 Mar 2024 17:08:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVD5/orL9cdIwgwcMVWyHeX3h9qVmN/fKcx9XpUUx+SA/jJW07GdqvjCRXjn+pw/4BlFPot8cY2fs6D6yOyFDBXMYU+oHr/Dj7Hb9raqQ== X-Google-Smtp-Source: AGHT+IEL6COyuH5C++3y5+ONogq5Zl82DaGpqaZNV2TxQXtS2e1008TOLshkBnSLMjFgiF6IujhA X-Received: by 2002:a17:906:2687:b0:a46:bdfe:225b with SMTP id t7-20020a170906268700b00a46bdfe225bmr4117228ejc.11.1711325321830; Sun, 24 Mar 2024 17:08:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325321; cv=pass; d=google.com; s=arc-20160816; b=BMC7ejCRf1dQO7c8DrZPI+1UaM7bEZpgRjy1xWSRtlOsfbZ5502AVxah6JDFLbgBqC 0spWB7+w7oWkhtwX/Dv8AHL9Om7qfetwyhPjfuGb+DefxX+cQeJvyrTOnQgo3C2zzYol Q4ctwidCzl5NiZQKeF+baE0gAx4wjBtGzXTJ7Tp4fLU0d7yPFDmxNhynwzj0vN7eSRiv x1wsl3lnwXlXp8bz/JGaQ0rZpQxix+QzNmWl9INzn+hLrLwkVtdNr8o5RrIptxuOHCSP RSuirk9RioOoDIf1xgEE5jLExNe/edwpJr3ZGCs7rQ/pYRNsQuFKKh3o6jW7UHIdV/F/ h2sg== 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=HWRIoHF+v2/DuACcoCeV64KUilQddsX0SMLs7zBTFevBNnI08D6mwVAXfk+yUP2U8G ubCKU/VbH2phIqKQgTOF6IEVJioX0dcAu0fv9JwoWKyG2oIgodTk3ssnsWi1EBGtuEFq 1/T09IIoiDxHN3QqlJfsVSnOeyphKNmi4cKO+U+2jthodwxwW+OZnWCJROIYCPmiYWjx BQpe6mWHTwMWAM14gUp4ECmPQmVlZGei8r4PgKOJ5mB6riLGdKQ8SBfMGcxMWS5P4T0S EwPiyK8+vEYTFr8cjzhuxWJouOUdGKoja9OfXEFXbSYW0jV0e7qqCWTc7tJCh2j2ramm mEDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JdoOfvr+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113285-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h18-20020a1709066d9200b00a498917eaf3si552695ejt.684.2024.03.24.17.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113285-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JdoOfvr+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113285-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113285-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 096CF1F25F3E for ; Mon, 25 Mar 2024 00:01:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFC0818D87D; Sun, 24 Mar 2024 22:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JdoOfvr+" 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 109B118D865; Sun, 24 Mar 2024 22:41: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=1711320086; cv=none; b=sri9ymZst+im70qLeZMwvSmx8VdAZ9yHLpZgn6Wd+82qbZ31Z2lkJ9mFmwK3AHaWlL2OVClOa6o2qmi1BhxHJ/kUrOyoIWYFLyLpu3gj/M4mM88U0RhXyRUTKKxgXNKfzS1sCiDocLr+OQTiZZD3H8FWmuPajSl7JLmcHNhwQU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320086; c=relaxed/simple; bh=CwWwXVhHyKnLQ10moKJIyAHUeLsBYRK/aKO6LwRtc0U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IvC+w1hzGSqa8rNu6d+4U0AZ058m9ZbMVZNUbAAR81uy8YQd1D9WC3HMjW71yl3kF4fgxE003DQrCBQ09Cn+5fsZJ5tD1YtBRI752V+TbYWIYyR7nRL/NgMKzNmOdJKIbphZqx9kEj+hiZFziLhOT9dXIwPwYcXWze7UzWwialo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JdoOfvr+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34712C433B2; Sun, 24 Mar 2024 22:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320085; bh=CwWwXVhHyKnLQ10moKJIyAHUeLsBYRK/aKO6LwRtc0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JdoOfvr+VZSdmVC8LrtpFULwbyzXAEHQiV7h292Rjo1c7tKU8BzWvZxpeHK6RAwTR /IIYioCTAvfpFQd1bl6fZojKKIqRDIqqtKOL+G72PtCPcK/NcTpe9dT+OTy/cAdHV1 tExhO6Uc9hBzxA7fYkRBJVzSwiZsNZbt8SHlUUqtW34YydeBAHWY7XmRRlmvkfonZa gESInuNelhuTjon215wzVuxD0eKhU52jbCqEWCBnKczJshKPXOXz8Q1jP8qxEItOqb AC+yD6N4KOBPMjWXbylXO39G7YmJ36oG5NybErIVjqTxIdFKQV5z7/DNh5gL2oshaa W6zQ6BYC/7Bvg== 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.8 394/715] media: em28xx: annotate unchecked call to media_device_register() Date: Sun, 24 Mar 2024 18:29:33 -0400 Message-ID: <20240324223455.1342824-395-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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