lkml.org 
[lkml]   [2021]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] iio: accel: adxl355: use if(ret) in place of ret < 0
Date
Replace if(ret < 0) with if(ret) for consistency.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
drivers/iio/accel/adxl355_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c
index c91d2254c..0b9996c17 100644
--- a/drivers/iio/accel/adxl355_core.c
+++ b/drivers/iio/accel/adxl355_core.c
@@ -570,7 +570,7 @@ int adxl355_core_probe(struct device *dev, struct regmap *regmap,
indio_dev->num_channels = ARRAY_SIZE(adxl355_channels);

ret = adxl355_setup(data);
- if (ret < 0) {
+ if (ret) {
dev_err(dev, "ADXL355 setup failed\n");
return ret;
}
--
2.30.1
\
 
 \ /
  Last update: 2021-09-03 20:44    [W:2.249 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site