drivers: sensor: tmd2620: coverity 316443 unchecked return value

The return value is consciously not checked, because the operation
is expected to fail. And the real request is executed afterwards.

Fixes #58593
Coverity-CID: 316443

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2023-07-10 11:29:25 +02:00 committed by Maureen Helm
commit 7c6a340413

View file

@ -175,7 +175,7 @@ static int tmd2620_sensor_setup(const struct device *dev)
/* trying to read the id twice, as the sensor does not answer the first request */
/* because of this no return code is checked in this line */
i2c_reg_read_byte_dt(&config->i2c, TMD2620_ID_REG, &chip_id);
(void)i2c_reg_read_byte_dt(&config->i2c, TMD2620_ID_REG, &chip_id);
ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_ID_REG, &chip_id);
if (ret < 0) {