]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: bttv: fix WARNING regression on tunerless devices
authorOndrej Zary <linux@zary.sk>
Sat, 25 Dec 2021 21:58:44 +0000 (22:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:05:45 +0000 (14:05 +0200)
commita80c71879123decd36a1e73a3c4533fb58b67206
treebc577e38c52ead8a69bd577a30ceb22f4bd80ea6
parent2f5ecf5edb6892464c25de1405b266c8f6fea1ed
media: bttv: fix WARNING regression on tunerless devices

[ Upstream commit ef058cc8b7193d15a771272359c7454839ae74ee ]

Commit 2161536516ed ("media: media/pci: set device_caps in struct video_device")
introduced a regression: V4L2_CAP_TUNER is always present in device_caps,
even when the device has no tuner.

This causes a warning:
WARNING: CPU: 0 PID: 249 at drivers/media/v4l2-core/v4l2-ioctl.c:1102 v4l_querycap+0xa0/0xb0 [videodev]

Fixes: 2161536516ed ("media: media/pci: set device_caps in struct video_device")
Signed-off-by: Ondrej Zary <linux@zary.sk>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/bt8xx/bttv-driver.c