]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: ar0521: don't overflow when checking PLL values
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 15 Oct 2024 09:38:10 +0000 (11:38 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 18 Oct 2024 08:43:03 +0000 (10:43 +0200)
commit438d3085ba5b8b5bfa5290faa594e577f6ac9aa7
tree55febc48dcfdf6e210e57b18caaa862f50b0a8a1
parent14a22762c3daeac59a5a534e124acbb4d7a79b3a
media: ar0521: don't overflow when checking PLL values

The PLL checks are comparing 64 bit integers with 32 bit
ones, as reported by Coverity. Depending on the values of
the variables, this may underflow.

Fix it ensuring that both sides of the expression are u64.

Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/media/i2c/ar0521.c