diff options
author | Laurent Pinchart | 2023-04-20 10:45:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-06-09 10:34:18 +0200 |
commit | 47cc3cae303c289c51135f90cd5ff961f340b8e0 (patch) | |
tree | 23e4cee249dcf110adaa290e3f58f18fd18014ea /drivers/iio/accel | |
parent | 4d776371127ec55590d49eea7579e77f555548ad (diff) |
media: uvcvideo: Don't expose unsupported formats to userspace
[ Upstream commit 81f3affa19d6ab0c32aef46b053838219eef7e71 ]
When the uvcvideo driver encounters a format descriptor with an unknown
format GUID, it creates a corresponding struct uvc_format instance with
the fcc field set to 0. Since commit 50459f103edf ("media: uvcvideo:
Remove format descriptions"), the driver relies on the V4L2 core to
provide the format description string, which the V4L2 core can't do
without a valid 4CC. This triggers a WARN_ON.
As a format with a zero 4CC can't be selected, it is unusable for
applications. Ignore the format completely without creating a uvc_format
instance, which fixes the warning.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217252
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2180107
Fixes: 50459f103edf ("media: uvcvideo: Remove format descriptions")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iio/accel')
0 files changed, 0 insertions, 0 deletions