]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: chemical: bme680: Fix overflows in compensate() functions
authorVasileios Amoiridis <vassilisamir@gmail.com>
Thu, 6 Jun 2024 21:22:55 +0000 (23:22 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Jun 2024 11:02:13 +0000 (12:02 +0100)
commitfdd478c3ae98c3f13628e110dce9b6cfb0d9b3c8
treee43bf69485e8b871df5131019a3edff9d5eb4cf1
parentb47c0fee73a810c4503c4a94ea34858a1d865bba
iio: chemical: bme680: Fix overflows in compensate() functions

There are cases in the compensate functions of the driver that
there could be overflows of variables due to bit shifting ops.
These implications were initially discussed here [1] and they
were mentioned in log message of Commit 1b3bd8592780 ("iio:
chemical: Add support for Bosch BME680 sensor").

[1]: https://lore.kernel.org/linux-iio/20180728114028.3c1bbe81@archlinux/

Fixes: 1b3bd8592780 ("iio: chemical: Add support for Bosch BME680 sensor")
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://lore.kernel.org/r/20240606212313.207550-4-vassilisamir@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/bme680_core.c