Commit 8bc1f428 authored by Vasileios Amoiridis's avatar Vasileios Amoiridis Committed by Jonathan Cameron

iio: chemical: bme680: Make error checks consistent

In the majority of the error checks after a regmap_{read,write}()
operation the following coding style is used:

	ret = regmap_{read,write}(data->regmap, ...);
	if (ret < 0) {
		dev_err(dev, ...);
		return ret;
	}

In this particular case it was different so change it for consistency.
Signed-off-by: default avatarVasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20240609233826.330516-11-vassilisamir@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f2f2e7b1
......@@ -517,10 +517,12 @@ static int bme680_chip_config(struct bme680_data *data)
ret = regmap_write_bits(data->regmap, BME680_REG_CTRL_MEAS,
BME680_OSRS_TEMP_MASK | BME680_OSRS_PRESS_MASK,
osrs);
if (ret < 0)
if (ret < 0) {
dev_err(dev, "failed to write ctrl_meas register\n");
return ret;
}
return ret;
return 0;
}
static int bme680_gas_config(struct bme680_data *data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment