linux-stable/drivers/media
Laurent Pinchart ba95955ee1 media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values
[ Upstream commit dc9455ffae ]

The Renkforce RF AC4K 300 Action Cam 4K reports invalid bFormatIndex and
bFrameIndex values when negotiating the video probe and commit controls.
The UVC descriptors report a single supported format and frame size,
with bFormatIndex and bFrameIndex both equal to 2, but the video probe
and commit controls report bFormatIndex and bFrameIndex set to 1.

The device otherwise operates correctly, but the driver rejects the
values and fails the format try operation. Fix it by ignoring the
invalid indices, and assuming that the format and frame requested by the
driver are accepted by the device.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=210767

Fixes: 8a652a17e3 ("media: uvcvideo: Ensure all probed info is returned to v4l2")
Reported-by: Till Dörges <doerges@pre-sense.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:23 +01:00
..
cec cec-api: prevent leaking memory through hole in structure 2020-09-03 11:26:46 +02:00
common media: siano: fix memory leak of debugfs members in smsdvb_hotplug 2020-12-30 11:51:12 +01:00
dvb-core media: dvbdev: Fix tuner->demod media controller link 2020-06-22 09:30:55 +02:00
dvb-frontends media: tda10071: fix unsigned sign extension overflow 2020-10-01 13:17:41 +02:00
firewire media: firewire: fix memory leak 2020-10-29 09:58:01 +01:00
i2c media: i2c: ov5670: Fix PIXEL_RATE minimum value 2021-03-04 10:26:20 +01:00
mc media: mc-device.c: fix memleak in media_device_register_entity 2020-10-01 13:17:10 +02:00
mmc
pci media: cx25821: Fix a bug when reallocating some dma memory 2021-03-04 10:26:22 +01:00
platform media: pxa_camera: declare variable when DEBUG is defined 2021-03-04 10:26:22 +01:00
radio
rc media: rc: ensure that uevent can be read directly after rc device register 2021-02-03 23:25:56 +01:00
spi
tuners media: qm1d1c0042: fix error return code in qm1d1c0042_init() 2021-03-04 10:26:22 +01:00
usb media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values 2021-03-04 10:26:23 +01:00
v4l2-core media: v4l2-fwnode: Return -EINVAL for invalid bus-type 2020-12-30 11:51:08 +01:00
Kconfig
Makefile