Commit c046bb5d authored by Thomas Haemmerle's avatar Thomas Haemmerle Committed by Jonathan Cameron

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: default avatarThomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Link: https://lore.kernel.org/r/20240415105030.1161770-4-thomas.haemmerle@leica-geosystems.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b8189beb
......@@ -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;
/*
......
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