[PATCH 5/5] iio: filter: admv8818: remove redundant else after return

Antoniu Miclaus posted 5 patches 1 month, 2 weeks ago
[PATCH 5/5] iio: filter: admv8818: remove redundant else after return
Posted by Antoniu Miclaus 1 month, 2 weeks ago
The else in admv8818_init() is unnecessary since the if block already
returns after calling admv8818_rfin_band_select() when clkin is present.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/iio/filter/admv8818.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/filter/admv8818.c b/drivers/iio/filter/admv8818.c
index 19f823446cda..e494fd33911b 100644
--- a/drivers/iio/filter/admv8818.c
+++ b/drivers/iio/filter/admv8818.c
@@ -695,8 +695,8 @@ static int admv8818_init(struct admv8818_state *st)
 
 	if (st->clkin)
 		return admv8818_rfin_band_select(st);
-	else
-		return 0;
+
+	return 0;
 }
 
 static int admv8818_clk_setup(struct admv8818_state *st)
-- 
2.43.0
Re: [PATCH 5/5] iio: filter: admv8818: remove redundant else after return
Posted by Andy Shevchenko 1 month, 2 weeks ago
On Fri, Feb 20, 2026 at 03:33:34PM +0200, Antoniu Miclaus wrote:
> The else in admv8818_init() is unnecessary since the if block already
> returns after calling admv8818_rfin_band_select() when clkin is present.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko