Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2507074lqp; Mon, 25 Mar 2024 00:13:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5xda+wLt63cfK9InDYt180hDIvbpf3MPAm3vlVJPOjXjaD3iG1Jx/5cLySY/yozRA9gHn//PHt+sQNETjFO/VAweiaa51wnF1bxyTnA== X-Google-Smtp-Source: AGHT+IGeR9zMPOl2cypPq79iOT3HWC50kgQ8D2qm//lNBCTD3qQ8x0KeLFHeb6lAxCT1hKjhZOlk X-Received: by 2002:a05:620a:2a05:b0:78a:5d0a:e326 with SMTP id o5-20020a05620a2a0500b0078a5d0ae326mr47099qkp.10.1711350808347; Mon, 25 Mar 2024 00:13:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711350808; cv=pass; d=google.com; s=arc-20160816; b=wPWnFsJDX41wKLIt6+ndQeEpXgWMhOFwkbAl16xD4kDskmLHlfYRYtfB8YV3QzqKBu NFVQ0mdFoUweJYTYGzX+Wq6unYztJ4P96BbHFioXOYDfDEgErXPl4nyAghVihDHYK8jC Q7AcSaCtG7QueweSPJHY8iZ/+34pW1o9O2Obf8Ypczisar7YDI7w/r/aNsB0s5/irEK2 1Nhnlm9/HB2BneKd9xUUHMbGtf9006u6ZpH0KxR4k5pE9wOwWAcC8R0hnCrmCrAysQJi aw4BdF092ocFiUdJX36NsawGk0qwLv3xWc0WpFmV5aM9HRX4W+3Dq3tkcRPQ8uG0vXML 8OvQ== 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=sVJMq3krZh7h09F1pRx3EXlwtRmkVtPl0hePdso2JUY=; fh=KJQR4vjPWqw1Crp1HMOZnYdiCqQgRl4FNsvnxDw8yMU=; b=ks06Kw/IP2ETHPlPheuR47+D/8jhqiAlFd36HK33Rwr/DmLwvZQzax9irXZ/OFzVSI O6SBGMTv3m6hGLVILBlXwlXwBKHCTH7isKdB/CRUYlwF3di4NtREE4sVhmSvnlTig7vU IDU1Jdu7GzPruydxtkUnNGawSrPBgFTBRsYaTgdax++9LEXrbElQwiXV7OZM/3tF3K69 QHDFsTDVrTod+JQQzr3q3V0CKAk67pIH4eR39+YwPixhQVN1Yagw1BChsKcCzlp96V9D ywY6XLRl5w48iVzLhf9Sytjntyok/PMQqjKTpkOtTJpwZ3Lew3XhSZUE67sIxPQJsDOT ed2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZPBfR0bx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g15-20020a05620a278f00b0078a5c8fc6b5si151954qkp.447.2024.03.25.00.13.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 00:13:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZPBfR0bx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114998-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0D6AE1C2E139 for ; Mon, 25 Mar 2024 07:13:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C502F2E5E89; Mon, 25 Mar 2024 00:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZPBfR0bx" 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 ED09317C18E; Sun, 24 Mar 2024 23:42:37 +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=1711323759; cv=none; b=e91Hq+FYrbAgUtH0Ktzwd68ACcdNgz4wSvPlWJb/B2hj/AbhmT4u5Qfa4XmZ9XXOv1jxtPj62xW/1TOR9hfjfEziqt0Na0wv5h9IuY3Sg+AAj5eJFD7Ragyq2R2BiAEB+f5bEQjCH8LK/Au7e0ZqQdqzimmFNPwa+HEq4CObcIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323759; c=relaxed/simple; bh=MVy30skJmr/gnrE3NXzsrkaw9rfY27uWDHKUBovWHjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FsfOsWfeFW8dYPn3HI7eSiRfLDZNe5wHpIOSZ1UFQoO1SciNtIt258/rsY/I+UN8FqQWBq2QTaFu/xm/h2522imKsYQj+FwlBlRhi8hm8Wg2ED0DNPZWoLd9PFX4XyNNDzOkA1otRfwyZx3+RKP2oCMb99P4s7KKVzTbRk5Fy/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZPBfR0bx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20B8BC433A6; Sun, 24 Mar 2024 23:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323757; bh=MVy30skJmr/gnrE3NXzsrkaw9rfY27uWDHKUBovWHjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPBfR0bxtw9yjR0nJeqRIatwE4je79zUOEufcped2TQorl0ugAZoSyt221j7grr0/ umGLwdBT9wdT64jfLlvd2Ns3D4keZc1uB+qHR46tHCvClYb7Xh7njO0a8vs5dTKlCa nC65ZVAPI8J8iCrx99gBjNx1w88CeCT/e3l7UnraFThHv6MG8R477OpQd+4eoG5Xni TQRRACkD+5AuyVhrQk1GuGMZQUdHtWgU5AWEqMeuv9LBn9FuGrYVxwLD8iSOrpp2js ey8IQvgBBM8ObE/xuj/n4zr2N9YiJihlLOgczAVshAWmuFDbJdV9LarM/rh9L49bX2 PkcZGqXwFHctw== 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 5.10 132/238] media: em28xx: annotate unchecked call to media_device_register() Date: Sun, 24 Mar 2024 19:38:40 -0400 Message-ID: <20240324234027.1354210-133-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 26408a972b443..5deee83132c62 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -4049,6 +4049,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