[PATCH 28/36] regulator: wm831x-isink: remove conditional return with no effect
From: Sang-Heon Jeon
Date: Thu Jul 23 2026 - 15:00:23 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>
---
drivers/regulator/wm831x-isink.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 43f220cea21c..b46e2cde5e9d 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -62,11 +62,7 @@ static int wm831x_isink_disable(struct regulator_dev *rdev)
if (ret < 0)
return ret;
- ret = wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_ENA, 0);
- if (ret < 0)
- return ret;
-
- return ret;
+ return wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_ENA, 0);
}
--
2.43.0