]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: em28xx: annotate unchecked call to media_device_register()
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>
Fri, 12 Jan 2024 13:42:26 +0000 (05:42 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:21:55 +0000 (18:21 -0400)
[ 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 <mchehab@kernel.org>
Fixes: 37ecc7b1278f ("[media] em28xx: add media controller support")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/em28xx/em28xx-cards.c

index 26408a972b443e7d90751aa3ad8beb9362b51be1..5deee83132c623e53bb29052ab9e014d0de01f87 100644 (file)
@@ -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