media: cx18: fix incorrect input counting
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 1 Feb 2023 11:19:46 +0000 (12:19 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 19 Mar 2023 21:11:44 +0000 (22:11 +0100)
commit274cb00985e2b58210d6799e38b4fc43627e2546
tree02dcba22d13ac4dbdaebfe88e26426d8596074da
parent643e83501461763032ae51e4d540176e6a887d31
media: cx18: fix incorrect input counting

Counting the number of video and audio inputs was wrong if the
number of inputs equalled CX18_CARD_MAX_VIDEO_INPUTS or
CX18_CARD_MAX_AUDIO_INPUTS. This was a copy-and-paste from the
ivtv driver. That driver has been fixed quite a long time ago,
but we missed that this driver had the same bug.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/pci/cx18/cx18-driver.c