[PATCH 8/9] iio: light: tsl2583: remove conditional return with no effect

From: Sang-Heon Jeon

Date: Mon Jul 27 2026 - 14:50:55 EST


Both branches of the check return the same value, so the check has no
effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/iio/light/tsl2583.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
index 06da145569f7..53fd423aa7ae 100644
--- a/drivers/iio/light/tsl2583.c
+++ b/drivers/iio/light/tsl2583.c
@@ -456,12 +456,8 @@ static int tsl2583_chip_init_and_power_on(struct iio_dev *indio_dev)

usleep_range(3000, 3500);

- ret = tsl2583_set_power_state(chip, TSL2583_CNTL_PWR_ON |
- TSL2583_CNTL_ADC_ENBL);
- if (ret < 0)
- return ret;
-
- return ret;
+ return tsl2583_set_power_state(chip,
+ TSL2583_CNTL_PWR_ON | TSL2583_CNTL_ADC_ENBL);
}

/* Sysfs Interface Functions */
--
2.43.0