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 --- The memblock patch of the treewide v1 series [1] is posted separately. You can find the Coccinelle script in v1 [1]. --- Changes from v1 [1] - Change base to memblock/for-next - Filter only memblock changes [1] https://lore.kernel.org/all/20260723184538.3888637-1-ekffu200098@gmail.com/ --- mm/memblock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index 43e036f3e11a..9a31781923fb 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -2613,15 +2613,10 @@ static int __init prepare_kho_fdt(void) static int __init reserve_mem_init(void) { - int err; - if (!kho_is_enabled() || !reserved_mem_count) return 0; - err = prepare_kho_fdt(); - if (err) - return err; - return err; + return prepare_kho_fdt(); } late_initcall(reserve_mem_init); -- 2.43.0