[PATCH 23/36] dm vdo: remove conditional return with no effect

From: Sang-Heon Jeon

Date: Thu Jul 23 2026 - 15:02:15 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/md/dm-vdo/encodings.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-vdo/encodings.c b/drivers/md/dm-vdo/encodings.c
index d75e023df637..b09373b0cfe8 100644
--- a/drivers/md/dm-vdo/encodings.c
+++ b/drivers/md/dm-vdo/encodings.c
@@ -1333,12 +1333,8 @@ int vdo_validate_config(const struct vdo_config *config,
if (result != VDO_SUCCESS)
return result;

- result = VDO_ASSERT(is_power_of_2(config->recovery_journal_size),
- "recovery journal size must be a power of two");
- if (result != VDO_SUCCESS)
- return result;
-
- return result;
+ return VDO_ASSERT(is_power_of_2(config->recovery_journal_size),
+ "recovery journal size must be a power of two");
}

/**
--
2.43.0