Commit 81f3aff
media: uvcvideo: Don't expose unsupported formats to userspace
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 50459f1 ("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: 50459f1 ("media: uvcvideo: Remove format descriptions")
Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Ricardo Ribalda <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>1 parent b37a356 commit 81f3aff
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | | - | |
| 261 | + | |
260 | 262 | | |
261 | 263 | | |
| 264 | + | |
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| |||
675 | 678 | | |
676 | 679 | | |
677 | 680 | | |
678 | | - | |
| 681 | + | |
679 | 682 | | |
680 | 683 | | |
681 | 684 | | |
| |||
689 | 692 | | |
690 | 693 | | |
691 | 694 | | |
| 695 | + | |
| 696 | + | |
692 | 697 | | |
| 698 | + | |
693 | 699 | | |
694 | 700 | | |
695 | 701 | | |
| |||
0 commit comments