[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410103604.992989-4-thomas.haemmerle@leica-geosystems.com>
Date: Wed, 10 Apr 2024 12:36:03 +0200
From: Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>
To: joel@....id.au
Cc: bsp-development.geo@...ca-geosystems.com,
Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>,
Eddie James <eajames@...ux.ibm.com>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 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 a48e8adf63ae..4abce7e40715 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