iio: pressure: dps310: consistently check return value of regmap_read

Align the check of return values `regmap_read` so that it's consistent
across this driver code.

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Link: https://lore.kernel.org/r/20240415105030.1161770-4-thomas.haemmerle@leica-geosystems.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Thomas Haemmerle 2024-04-15 12:50:29 +02:00 committed by Jonathan Cameron
parent b8189beb2c
commit c046bb5d95

View File

@ -171,7 +171,7 @@ static int dps310_temp_workaround(struct dps310_data *data)
int reg;
rc = regmap_read(data->regmap, 0x32, &reg);
if (rc)
if (rc < 0)
return rc;
/*