[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240415105030.1161770-4-thomas.haemmerle@leica-geosystems.com>
Date: Mon, 15 Apr 2024 12:50:29 +0200
From: Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>
To: jic23@...nel.org
Cc: bsp-development.geo@...ca-geosystems.com,
Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>,
Eddie James <eajames@...ux.ibm.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Joel Stanley <joel@....id.au>,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 3/4] 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@...ca-geosystems.com>
---
drivers/iio/pressure/dps310.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index 3fc436f36fa7..c30623d96f0e 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -171,7 +171,7 @@ static int dps310_temp_workaround(struct dps310_data *data)
int reg;
rc = regmap_read(data->regmap, 0x32, ®);
- if (rc)
+ if (rc < 0)
return rc;
/*
--
2.34.1
Powered by blists - more mailing lists