]> git.ipfire.org Git - thirdparty/kernel/stable.git/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>
Thu, 14 Nov 2024 12:13:38 +0000 (13:13 +0100)
commitf2b4f277c41db8d548f38f1dd091bbdf6a5acb07
tree2b50b2715939a7fc4d1cb6181f89f77daf2e0fd4
parenta930cddfd153b5d4401df0c01effa14c831ff21e
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