mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 02:33:57 +00:00
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: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20240609233826.330516-11-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
f2f2e7b1a4
commit
8bc1f428ba
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user