Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e6892b2 authored by Nikita Zhandarovich's avatar Nikita Zhandarovich Committed by Sasha Levin
Browse files

media: em28xx: annotate unchecked call to media_device_register()



[ 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: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Fixes: 37ecc7b1 ("[media] em28xx: add media controller support")
Signed-off-by: default avatarNikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 639155da
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3989,6 +3989,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