From 86ff6cb15f46310a8f88f36f4c5e3b6a9ca32efd Mon Sep 17 00:00:00 2001
From: Puranjay Mohan <puranjay12@gmail.com>
Date: Sat, 4 Sep 2021 00:13:11 +0530
Subject: [PATCH] iio: accel: adxl355: use if(ret) in place of ret < 0

Replace if(ret < 0) with if(ret) for consistency.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Link: https://lore.kernel.org/r/20210903184312.21009-2-puranjay12@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/accel/adxl355_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c
index f71f64b32a015..d3ed7eec9485e 100644
--- a/drivers/iio/accel/adxl355_core.c
+++ b/drivers/iio/accel/adxl355_core.c
@@ -262,7 +262,7 @@ static int adxl355_read_axis(struct adxl355_data *data, u8 addr)
 
 	ret = regmap_bulk_read(data->regmap, addr, data->transf_buf,
 			       ARRAY_SIZE(data->transf_buf));
-	if (ret < 0)
+	if (ret)
 		return ret;
 
 	return get_unaligned_be24(data->transf_buf);
@@ -294,13 +294,13 @@ static int adxl355_set_odr(struct adxl355_data *data,
 	}
 
 	ret = adxl355_set_op_mode(data, ADXL355_STANDBY);
-	if (ret < 0)
+	if (ret)
 		goto err_unlock;
 
 	ret = regmap_update_bits(data->regmap, ADXL355_FILTER_REG,
 				 ADXL355_FILTER_ODR_MSK,
 				 FIELD_PREP(ADXL355_FILTER_ODR_MSK, odr));
-	if (ret < 0)
+	if (ret)
 		goto err_set_opmode;
 
 	data->odr = odr;
@@ -333,7 +333,7 @@ static int adxl355_set_hpf_3db(struct adxl355_data *data,
 	}
 
 	ret = adxl355_set_op_mode(data, ADXL355_STANDBY);
-	if (ret < 0)
+	if (ret)
 		goto err_unlock;
 
 	ret = regmap_update_bits(data->regmap, ADXL355_FILTER_REG,
@@ -366,7 +366,7 @@ static int adxl355_set_calibbias(struct adxl355_data *data,
 	mutex_lock(&data->lock);
 
 	ret = adxl355_set_op_mode(data, ADXL355_STANDBY);
-	if (ret < 0)
+	if (ret)
 		goto err_unlock;
 
 	put_unaligned_be16(calibbias, data->transf_buf);
@@ -598,7 +598,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.2