]> 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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 18 Oct 2024 08:43:03 +0000 (10:43 +0200)
commit576a307a7650bd544fbb24df801b9b7863b85e2f
tree378ce31735d3d4d71e75bf2c8cc50b2bbe5f9d47
parent438d3085ba5b8b5bfa5290faa594e577f6ac9aa7
media: cx24116: prevent overflows on SNR calculus

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>
drivers/media/dvb-frontends/cx24116.c