linux-stable/drivers/iio/chemical
Tom Rix 3ea6c6cc98 iio: scd4x: check return of scd4x_write_and_fetch
commit f50232193e upstream.

Clang static analysis reports this problem
scd4x.c:474:10: warning: The left operand of '==' is a
  garbage value
  if (val == 0xff) {
      ~~~ ^
val is only set from a successful call to scd4x_write_and_fetch()
So check it's return.

Fixes: 49d22b695c ("drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor")
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220301025223.223223-1-trix@redhat.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-09 09:16:12 +02:00
..
ams-iaq-core.c iio:chemical:ams-iaq-core: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
atlas-ezo-sensor.c iio: chemical: atlas-ezo-sensor: add humidity sensor support 2020-09-03 19:40:48 +01:00
atlas-sensor.c iio: atlas-sensor: Remove no-op trigger ops 2021-11-17 17:51:38 +00:00
bme680.h
bme680_core.c iio: bme680: Use DIV_ROUND_CLOSEST() instead of open-coding it 2021-01-09 21:52:45 +00:00
bme680_i2c.c iio: bme680_i2c: Remove acpi_device_id table 2021-05-17 13:54:23 +01:00
bme680_spi.c iio: bme680_spi: Remove acpi_device_id table 2021-05-17 13:54:23 +01:00
ccs811.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
Kconfig drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor 2021-10-19 08:30:44 +01:00
Makefile drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor 2021-10-19 08:30:44 +01:00
pms7003.c iio: chemical: pms7003: convert comma to semicolon 2021-01-09 14:25:28 +00:00
scd4x.c iio: scd4x: check return of scd4x_write_and_fetch 2022-05-09 09:16:12 +02:00
scd30.h
scd30_core.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
scd30_i2c.c iio: chemical: scd30: add I2C interface driver 2020-06-27 14:50:30 +01:00
scd30_serial.c iio: use getter/setter functions 2021-03-11 20:47:07 +00:00
sgp30.c iio: chemical: sgp30: Drop use of %hx in format string. 2021-06-03 18:24:13 +01:00
sgp40.c iio: chemical: Add driver support for sgp40 2021-08-08 15:19:18 +01:00
sps30.c iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30.h iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_i2c.c iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_serial.c iio: sps30: add support for serial interface 2021-05-17 13:49:10 +01:00
sunrise_co2.c iio: chemical: sunrise_co2: set val parameter only on success 2021-12-28 18:37:41 +00:00
vz89x.c iio: vz89x: Remove unnecessary cast 2021-12-16 16:34:54 +00:00