]> git.hungrycats.org Git - linux/commit
media: cx24116: prevent overflows on SNR calculus
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 15 Oct 2024 10:14:11 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 13:59:36 +0000 (14:59 +0100)
commit828047c70f4716fde4b1316f7b610e97a4e83824
treeb2eece15729de9294bdae2562f74a6e9cc63f13d
parentf54e8e1e39dacccebcfb9a9a36f0552a0a97e2ef
media: cx24116: prevent overflows on SNR calculus

commit 576a307a7650bd544fbb24df801b9b7863b85e2f upstream.

as reported by Coverity, if reading SNR registers fail, a negative
number will be returned, causing an underflow when reading SNR
registers.

Prevent that.

Fixes: 8953db793d5b ("V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-frontends/cx24116.c