]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: vivid: don't set HDMI TX controls if there are no HDMI outputs
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Jun 2024 09:52:59 +0000 (12:52 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 28 Jun 2024 06:00:29 +0000 (08:00 +0200)
commit17763960b1784578e8fe915304b330922f646209
tree1288becbc93133ec02bbad8b83218b646d8c10fa
parente03549dd025392bffc47264d53894e48a387b25d
media: vivid: don't set HDMI TX controls if there are no HDMI outputs

When setting the EDID it would attempt to update two controls
that are only present if there is an HDMI output configured.

If there isn't any (e.g. when the vivid module is loaded with
node_types=1), then calling VIDIOC_S_EDID would crash.

Fix this by first checking if outputs are present.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/test-drivers/vivid/vivid-vid-cap.c